This commit is contained in:
Jan Eggers
2019-07-09 14:15:46 +02:00
parent 6608172719
commit 4f66614cdd
5 changed files with 82 additions and 6 deletions
@@ -0,0 +1,18 @@
using System.Buffers;
namespace MQTTnet.AspNetCore.Tests.Mockups
{
public class LimitedMemoryPool : MemoryPool<byte>
{
protected override void Dispose(bool disposing)
{
}
public override IMemoryOwner<byte> Rent(int minBufferSize = -1)
{
return new MemoryOwner(minBufferSize);
}
public override int MaxBufferSize { get; }
}
}