Skip to content

Class Lidgren::Network::NetQueue

template <T T>

ClassList > Lidgren > Network > NetQueue

Thread safe (blocking) expanding queue with TryDequeue() and EnqueueFirst()

Public Properties

Type Name
property int Capacity
Gets the current capacity for the queue.
property int Count
Gets the number of items in the queue.

Public Functions

Type Name
void Clear ()
Removes all objects from the queue.
bool Contains (T item)
Determines whether an item is in the queue.
void Enqueue (T item)
Adds an item last/tail of the queue.
void Enqueue (IEnumerable< T > items)
Adds an item last/tail of the queue.
void EnqueueFirst (T item)
Places an item first, at the head of the queue.
NetQueue (int initialCapacity)
NetQueue constructor.
T[] ToArray ()
Copies the queue items to a new array.
bool TryDequeue (out T item)
Gets an item from the head of the queue, or returns default(T) if empty.
int TryDrain (IList< T > addTo)
Gets all items from the head of the queue, or returns number of items popped.
T TryPeek (int offset)
Returns default(T) if queue is empty.

Public Properties Documentation

property Capacity

int Lidgren.Network.NetQueue< T >.Capacity;

property Count

int Lidgren.Network.NetQueue< T >.Count;

Public Functions Documentation

function Clear

inline void Lidgren::Network::NetQueue::Clear () 

function Contains

inline bool Lidgren::Network::NetQueue::Contains (
    T item
) 

function Enqueue [1/2]

inline void Lidgren::Network::NetQueue::Enqueue (
    T item
) 

function Enqueue [2/2]

inline void Lidgren::Network::NetQueue::Enqueue (
    IEnumerable< T > items
) 

function EnqueueFirst

inline void Lidgren::Network::NetQueue::EnqueueFirst (
    T item
) 

function NetQueue

inline Lidgren::Network::NetQueue::NetQueue (
    int initialCapacity
) 

function ToArray

inline T[] Lidgren::Network::NetQueue::ToArray () 

function TryDequeue

inline bool Lidgren::Network::NetQueue::TryDequeue (
    out T item
) 

function TryDrain

inline int Lidgren::Network::NetQueue::TryDrain (
    IList< T > addTo
) 

function TryPeek

inline T Lidgren::Network::NetQueue::TryPeek (
    int offset
) 

The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/Lidgren.Network/NetQueue.cs