C# Class OpenStory.Server.Networking.SocketAcceptor

Inheritance: IDisposable
Afficher le fichier Open project: shoftee/OpenStory Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void
SocketAcceptor ( IPEndPoint endpoint ) : System

Initializes a new instance of the SocketAcceptor class.

Start ( ) : void

Starts the process of accepting connections.

Stop ( ) : void

Halts the process of accepting connections.

Private Methods

Méthode Description
BeginAccept ( ) : void
DisposeSocketIfNotNull ( ) : void
EndAcceptAsynchronous ( SocketAsyncEventArgs eventArgs ) : void

Handles an asynchronous socket accept operation.

The only difference between this and EndAcceptSynchronous is that this calls BeginAccept if the socket was handled successfully.

EndAcceptSynchronous ( SocketAsyncEventArgs eventArgs ) : bool

Handles a synchronous socket accept operation.

GetAcceptSocket ( ) : Socket
OnSocketAccepted ( Socket acceptedSocket ) : void
OnSocketError ( SocketError error ) : void

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

SocketAcceptor() public méthode

Initializes a new instance of the SocketAcceptor class.
/// Thrown if is . ///
public SocketAcceptor ( IPEndPoint endpoint ) : System
endpoint System.Net.IPEndPoint The to accept connections through.
Résultat System

Start() public méthode

Starts the process of accepting connections.
/// Thrown if the event has no subscribers. ///
public Start ( ) : void
Résultat void

Stop() public méthode

Halts the process of accepting connections.
public Stop ( ) : void
Résultat void