Files
DanhengServer-OpenSource/GameServer/KcpSharp/DefaultArrayPoolBufferAllocator.cs
2024-02-25 16:45:05 +08:00

14 lines
377 B
C#

namespace EggLink.DanhengServer.KcpSharp
{
internal sealed class DefaultArrayPoolBufferAllocator : IKcpBufferPool
{
public static DefaultArrayPoolBufferAllocator Default { get; } = new();
public KcpRentedBuffer Rent(KcpBufferPoolRentOptions options)
{
return KcpRentedBuffer.FromSharedArrayPool(options.Size);
}
}
}