A class in Root.Township, Alta.Networking.Internal.
A pooled wrapper around a received packet's bytes, used by QueuedConnectionReceiver to queue packets for later frames.
Constructors
1 private and internal constructor
| Member | What it is |
|---|
private PooledDataQueueItem() | Creates a PooledDataQueueItem with default values. |
Fields
| Member | What it is |
|---|
ArraySegment<byte> queuedData | The queued packet bytes. |
2 private and internal fields
| Member | What it is |
|---|
private static Stack<PooledDataQueueItem> dataQueueItemPool | Static pool of free items. |
private const int MaxPoolSize | Pool size limit (100); released items beyond it are dropped. |
Methods
| Member | What it is |
|---|
static PooledDataQueueItem Get(ArraySegment<byte> queuedData) | Takes an item from the pool (or makes one) and sets it to hold the given data. |
void Release() | Returns the byte array to MessageReceivePool and puts the item back in the pool. |
1 private and internal method
| Member | What it is |
|---|
private void SetupItem(ArraySegment<byte> queuedData) | Sets the data the item holds; called by Get. |
Used in
Members of other types that take, return or hold a PooledDataQueueItem: