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
Afficher le fichier Open project: ermau/Tempest Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

public Dispose ( ) : void
Résultat void

NetworkConnectionProvider() public méthode

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. ///
Résultat System

NetworkConnectionProvider() public méthode

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

NetworkConnectionProvider() public méthode

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.
Résultat System

Start() public méthode

public Start ( MessageTypes types ) : void
types MessageTypes
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void