Files
DanhengServer-OpenSource/GameServer/KcpSharp/DefaultArrayPoolBufferAllocator.cs
2024-07-23 13:39:10 +08:00

11 lines
352 B
C#

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