C# Class NetMQ.Devices.DeviceBase

A DeviceBase forwards messages received by a front-end socket to a back-end socket, from which they are then sent, and can contain a Poller.
Inheritance: IDevice
Afficher le fichier Open project: NetMQ/NetMQ3-x

Protected Properties

Свойство Type Description
BackendSocket NetMQSocket
FrontendSocket NetMQSocket

Méthodes publiques

Méthode Description
Initialize ( ) : void

Configure the frontend and backend sockets and then Start this device.

Run ( ) : void

Initiate operation of the Poller associated with this device, if this device owns it. This also sets IsRunning to true.

Start ( ) : void
Stop ( bool waitForCloseToComplete = true ) : void

Stop the device and safely close the underlying sockets.

Méthodes protégées

Méthode Description
BackendHandler ( object sender, NetMQSocketEventArgs args ) : void

Invoked when a message has been received by the backend socket.

DeviceBase ( INetMQPoller poller, [ frontendSocket, [ backendSocket, DeviceMode mode ) : System

Create a new instance of the DeviceBase class.

DeviceBase ( NetMQSocket frontendSocket, NetMQSocket backendSocket, DeviceMode mode ) : System

Create a new instance of the DeviceBase class.

FrontendHandler ( object sender, NetMQSocketEventArgs args ) : void

Invoked when a message has been received by the frontend socket.

Method Details

BackendHandler() protected méthode

Invoked when a message has been received by the backend socket.
protected BackendHandler ( object sender, NetMQSocketEventArgs args ) : void
sender object the object that raised the ReceiveReady event
args NetMQSocketEventArgs a NetMQSocketEventArgs that contains a Socket for receiving data from
Résultat void

DeviceBase() protected méthode

Create a new instance of the DeviceBase class.
frontendSocket must not be null. backendSocket must not be null.
protected DeviceBase ( INetMQPoller poller, [ frontendSocket, [ backendSocket, DeviceMode mode ) : System
poller INetMQPoller the to use for detecting when messages are available
frontendSocket [ /// A that will pass incoming messages to . ///
backendSocket [ /// A that will receive messages from (and optionally send replies to) . ///
mode DeviceMode the (either Blocking or Threaded) for this device
Résultat System

DeviceBase() protected méthode

Create a new instance of the DeviceBase class.
protected DeviceBase ( NetMQSocket frontendSocket, NetMQSocket backendSocket, DeviceMode mode ) : System
frontendSocket NetMQSocket /// A that will pass incoming messages to . ///
backendSocket NetMQSocket /// A that will receive messages from (and optionally send replies to) . ///
mode DeviceMode the (either Blocking or Threaded) for this device
Résultat System

FrontendHandler() protected abstract méthode

Invoked when a message has been received by the frontend socket.
protected abstract FrontendHandler ( object sender, NetMQSocketEventArgs args ) : void
sender object the object that raised the ReceiveReady event
args NetMQSocketEventArgs a NetMQSocketEventArgs that contains a Socket for receiving data from
Résultat void

Initialize() public méthode

Configure the frontend and backend sockets and then Start this device.
public Initialize ( ) : void
Résultat void

Run() public méthode

Initiate operation of the Poller associated with this device, if this device owns it. This also sets IsRunning to true.
public Run ( ) : void
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Stop() public méthode

Stop the device and safely close the underlying sockets.
public Stop ( bool waitForCloseToComplete = true ) : void
waitForCloseToComplete bool If true, this method will block until the /// underlying poller is fully stopped. Defaults to true.
Résultat void

Property Details

BackendSocket protected_oe property

The backend socket that will normally receive messages from (and possibly send replies to) FrontendSocket.
protected NetMQSocket BackendSocket
Résultat NetMQSocket

FrontendSocket protected_oe property

The frontend socket that will normally pass messages to BackendSocket.
protected NetMQSocket FrontendSocket
Résultat NetMQSocket