FurinaImpact/FurinaImpact.Kcp/DefaultArrayPoolBufferAllocator.cs
2023-12-09 06:45:08 +03:00

13 lines
395 B
C#

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