C# Class NetMQ.Core.Transports.Tcp.TcpConnector

If 'delay' is true connector first waits for a while, then starts connection process.
Inheritance: Own, IProactorEvents
Afficher le fichier Open project: zeromq/netmq

Méthodes publiques

Méthode Description
Destroy ( ) : void

This does nothing.

InCompleted ( SocketError socketError, int bytesTransferred ) : void

This method would be called when a message receive operation has been completed, although here it only throws a NotImplementedException.

OutCompleted ( SocketError socketError, int bytesTransferred ) : void

This method is called when a message Send operation has been completed.

TcpConnector ( [ ioThread, [ session, [ options, [ addr, bool delayedStart ) : System

Create a new TcpConnector object.

TimerEvent ( int id ) : void

This is called when the timer expires - to start trying to connect.

Méthodes protégées

Méthode Description
ProcessPlug ( ) : void

Begin connecting. If a delayed-start was specified - then the reconnect-timer is set, otherwise this starts immediately.

ProcessTerm ( int linger ) : void

Process a termination request. This cancels the reconnect-timer, closes the AsyncSocket, and marks the socket-handle as invalid.

Private Methods

Méthode Description
AddReconnectTimer ( ) : void

Internal function to add a reconnect timer

Close ( ) : void

Close the connecting socket.

GetNewReconnectIvl ( ) : int

Internal function to return a reconnect back-off delay. Will modify the current_reconnect_ivl used for next call Returns the currently used interval

StartConnecting ( ) : void

Internal function to start the actual connection establishment.

Method Details

Destroy() public méthode

This does nothing.
public Destroy ( ) : void
Résultat void

InCompleted() public méthode

This method would be called when a message receive operation has been completed, although here it only throws a NotImplementedException.
InCompleted must not be called on a TcpConnector.
public InCompleted ( SocketError socketError, int bytesTransferred ) : void
socketError SocketError a SocketError value that indicates whether Success or an error occurred
bytesTransferred int the number of bytes that were transferred
Résultat void

OutCompleted() public méthode

This method is called when a message Send operation has been completed.
A non-recoverable socket error occurred. If the socketError is not Success then it must be a valid recoverable error.
public OutCompleted ( SocketError socketError, int bytesTransferred ) : void
socketError SocketError a SocketError value that indicates whether Success or an error occurred
bytesTransferred int the number of bytes that were transferred
Résultat void

ProcessPlug() protected méthode

Begin connecting. If a delayed-start was specified - then the reconnect-timer is set, otherwise this starts immediately.
protected ProcessPlug ( ) : void
Résultat void

ProcessTerm() protected méthode

Process a termination request. This cancels the reconnect-timer, closes the AsyncSocket, and marks the socket-handle as invalid.
protected ProcessTerm ( int linger ) : void
linger int a time (in milliseconds) for this to linger before actually going away. -1 means infinite.
Résultat void

TcpConnector() public méthode

Create a new TcpConnector object.
public TcpConnector ( [ ioThread, [ session, [ options, [ addr, bool delayedStart ) : System
ioThread [ the I/O-thread for this TcpConnector to live on.
session [ the session that will contain this
options [ Options that define this new TcpC
addr [ the Address for this Tcp to connect to
delayedStart bool this boolean flag dictates whether to wait before trying to connect
Résultat System

TimerEvent() public méthode

This is called when the timer expires - to start trying to connect.
public TimerEvent ( int id ) : void
id int The timer-id. This is not used.
Résultat void