C# Класс 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.
Наследование: IDevice
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
BackendSocket NetMQSocket
FrontendSocket NetMQSocket

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

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

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

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

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

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

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

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

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

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

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

FrontendHandler() защищенный абстрактный Метод

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

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

Configure the frontend and backend sockets and then Start this device.
public Initialize ( ) : void
Результат void

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

Initiate operation of the Poller associated with this device, if this device owns it. This also sets IsRunning to true.
public Run ( ) : void
Результат void

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

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

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

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

Описание свойств

BackendSocket защищенное свойство

The backend socket that will normally receive messages from (and possibly send replies to) FrontendSocket.
protected NetMQSocket BackendSocket
Результат NetMQSocket

FrontendSocket защищенное свойство

The frontend socket that will normally pass messages to BackendSocket.
protected NetMQSocket FrontendSocket
Результат NetMQSocket