C# Класс 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.

Наследование: IConnectionProvider
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

NetworkConnectionProvider() публичный Метод

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. ///
Результат System

NetworkConnectionProvider() публичный Метод

public NetworkConnectionProvider ( IEnumerable protocols, Target target, int maxConnections, RSAAsymmetricKey authKey, IEnumerable enabledHashAlgorithms = null ) : System
protocols IEnumerable
target Target
maxConnections int
authKey RSAAsymmetricKey
enabledHashAlgorithms IEnumerable
Результат System

NetworkConnectionProvider() публичный Метод

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.
Результат System

Start() публичный Метод

public Start ( MessageTypes types ) : void
types MessageTypes
Результат void

Stop() публичный Метод

public Stop ( ) : void
Результат void