Skip to main content

PooledDataQueueItem

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
MemberWhat it is
private PooledDataQueueItem()Creates a PooledDataQueueItem with default values.

Fields​

MemberWhat it is
ArraySegment<byte> queuedDataThe queued packet bytes.
2 private and internal fields
MemberWhat it is
private static Stack<PooledDataQueueItem> dataQueueItemPoolStatic pool of free items.
private const int MaxPoolSizePool size limit (100); released items beyond it are dropped.

Methods​

MemberWhat 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
MemberWhat 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: