Interface IDataBufferPool
A data buffer pool interface.
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public interface IDataBufferPool
Properties
PooledBytesAvailable
Gets the total bytes available in the pool.
Declaration
long PooledBytesAvailable { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
ReleasePools()
Release the pools.
Declaration
void ReleasePools()
Take(Int32)
Takes a buffer from the pool.
Declaration
DataBuffer Take(int size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size | The number of bytes needed. |
Returns
Type | Description |
---|---|
DataBuffer |
Take(Int32, Boolean)
Takes a buffer from the pool.
Declaration
DataBuffer Take(int size, bool littleEndian)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size | The number of bytes needed. |
System.Boolean | littleEndian | Whether the data buffer should be little-endian. |
Returns
Type | Description |
---|---|
DataBuffer |
Take(Int32, Boolean, Boolean)
Takes a buffer from the pool.
Declaration
DataBuffer Take(int size, bool littleEndian, bool clearBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size | The number of bytes needed. |
System.Boolean | littleEndian | Whether the data buffer should be little-endian. |
System.Boolean | clearBytes | Whether to clear the data buffer. |
Returns
Type | Description |
---|---|
DataBuffer |