13 lines
395 B
C#
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);
|
|
}
|
|
}
|
|
|
|
}
|