C# Class BF2Statistics.Net.SocketAsyncEventArgsPool

This class represents a thread safe pool of SocketAsyncEventArgs objects with the specifed capacity
Show file Open project: BF2Statistics/ControlCenter Class Usage Examples

Public Methods

Method Description
Pop ( ) : SocketAsyncEventArgs

Removes a SocketAsyncEventArgs instance from the pool.

Push ( SocketAsyncEventArgs item ) : void

Add a SocketAsyncEventArg instance to the pool.

SocketAsyncEventArgsPool ( int capacity ) : System

Initializes the object pool with the specified size

Method Details

Pop() public method

Removes a SocketAsyncEventArgs instance from the pool.
public Pop ( ) : SocketAsyncEventArgs
return System.Net.Sockets.SocketAsyncEventArgs

Push() public method

Add a SocketAsyncEventArg instance to the pool.
public Push ( SocketAsyncEventArgs item ) : void
item System.Net.Sockets.SocketAsyncEventArgs A SocketAsyncEventArgs instance to add to the pool
return void

SocketAsyncEventArgsPool() public method

Initializes the object pool with the specified size
public SocketAsyncEventArgsPool ( int capacity ) : System
capacity int Initial capacity of objects
return System