C# Класс NetMQ.Core.Transports.Tcp.TcpConnector

If 'delay' is true connector first waits for a while, then starts connection process.
Наследование: Own, IProactorEvents
Показать файл Открыть проект

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

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

Защищенные методы

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

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

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

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

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

This does nothing.
public Destroy ( ) : void
Результат void

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

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

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

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

ProcessPlug() защищенный Метод

Begin connecting. If a delayed-start was specified - then the reconnect-timer is set, otherwise this starts immediately.
protected ProcessPlug ( ) : void
Результат void

ProcessTerm() защищенный Метод

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

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

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

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

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