C# Class GamingInterface.SocketAsyncEventArgsPool

Represents a collection of resusable SocketAsyncEventArgs objects.
Datei anzeigen Open project: RocHCI/legion-gaming 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 to 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 The SocketAsyncEventArgs instance to add to the pool
return void

SocketAsyncEventArgsPool() public method

Initializes the object pool to the specified size
public SocketAsyncEventArgsPool ( int capacity ) : System
capacity int The maximum number of SocketAsyncEventArgs objects the pool can hold
return System