mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-14 05:44:34 +01:00
Init enter game
This commit is contained in:
23
KcpSharp/Base/ArrayMemoryOwner.cs
Normal file
23
KcpSharp/Base/ArrayMemoryOwner.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
#if !NEED_POH_SHIM
|
||||
|
||||
using System.Buffers;
|
||||
|
||||
namespace KianaBH.KcpSharp.Base;
|
||||
|
||||
internal sealed class ArrayMemoryOwner : IMemoryOwner<byte>
|
||||
{
|
||||
private readonly byte[] _buffer;
|
||||
|
||||
public ArrayMemoryOwner(byte[] buffer)
|
||||
{
|
||||
_buffer = buffer ?? throw new ArgumentNullException(nameof(buffer));
|
||||
}
|
||||
|
||||
public Memory<byte> Memory => _buffer;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user