C# Class Tempest.Providers.Network.NetworkConnectionProvider

High performance socket based IConnectionProvider.

Potential memory usage is dependent on a number of parameters: Each connection maintains a receive buffer with a size potential of NetworkConnection.MaxMessageSize. MaxConnections (set from constructor) determines the max number of connections on the individual NetworkConnectionProvider. NetworkConnection.SendBufferLimit determines how many send buffers (globally) can be created (both clients and servers both), with each having a size potential of NetworkConnection.MaxMessageSize.

Inheritance: IConnectionProvider
Mostrar archivo Open project: ermau/Tempest Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
NetworkConnectionProvider ( IEnumerable protocols, Target target, int maxConnections, IEnumerable enabledHashAlgs = null ) : System

Initializes a new instance of the NetworkConnectionProvider class.

NetworkConnectionProvider ( IEnumerable protocols, Target target, int maxConnections, RSAAsymmetricKey authKey, IEnumerable enabledHashAlgorithms = null ) : System
NetworkConnectionProvider ( Protocol protocol, Target target, int maxConnections ) : System

Initializes a new instance of the NetworkConnectionProvider class.

Start ( MessageTypes types ) : void
Stop ( ) : void

Private Methods

Method Description
Accept ( object sender, SocketAsyncEventArgs e ) : void
BeginAccepting ( SocketAsyncEventArgs e ) : void
Connect ( NetworkServerConnection connection ) : void
Disconnect ( NetworkServerConnection connection ) : void
Dispose ( bool disposing ) : void
GetConnectionId ( ) : int
OnConnectionMade ( ConnectionMadeEventArgs e ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

NetworkConnectionProvider() public method

Initializes a new instance of the NetworkConnectionProvider class.
or is null. is <= 0
public NetworkConnectionProvider ( IEnumerable protocols, Target target, int maxConnections, IEnumerable enabledHashAlgs = null ) : System
protocols IEnumerable The protocols to accept.
target Target The target to listen to.
maxConnections int Maximum number of connections to allow.
enabledHashAlgs IEnumerable /// The signature hash algorithms (in order of preference) to enable. /// null or an empty collection will enable all of the signature hash algorithms. ///
return System

NetworkConnectionProvider() public method

public NetworkConnectionProvider ( IEnumerable protocols, Target target, int maxConnections, RSAAsymmetricKey authKey, IEnumerable enabledHashAlgorithms = null ) : System
protocols IEnumerable
target Target
maxConnections int
authKey RSAAsymmetricKey
enabledHashAlgorithms IEnumerable
return System

NetworkConnectionProvider() public method

Initializes a new instance of the NetworkConnectionProvider class.
is null. is <= 0
public NetworkConnectionProvider ( Protocol protocol, Target target, int maxConnections ) : System
protocol Protocol The protocol to accept.
target Target The target to listen to.
maxConnections int Maximum number of connections to allow.
return System

Start() public method

public Start ( MessageTypes types ) : void
types MessageTypes
return void

Stop() public method

public Stop ( ) : void
return void