C# Class NetMQ.Devices.ForwarderDevice

Collects messages from a set of publishers and forwards these to a set of subscribers.
Generally used to bridge networks. E.g. read on TCP unicast and forward on multicast. This device is part of the publish-subscribe pattern. The frontend speaks to publishers and the backend speaks to subscribers. In order to use the ForwarderDevice please make sure you subscribe the FrontendSocket using the ForwarderDevice.FrontendSetup.
Inheritance: DeviceBase
Exibir arquivo Open project: NetMQ/NetMQ3-x

Public Methods

Method Description
ForwarderDevice ( INetMQPoller poller, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System

Initializes a new instance of the ForwarderDevice class.

ForwarderDevice ( string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System

Initializes a new instance of the ForwarderDevice class.

Protected Methods

Method Description
FrontendHandler ( object sender, NetMQSocketEventArgs args ) : void

This override of FrontendHandler receives data from the socket contained within args, and Sends it to BackendSocket.

Private Methods

Method Description
ForwarderDevice ( NetMQContext context, INetMQPoller poller, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System
ForwarderDevice ( NetMQContext context, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System

Method Details

ForwarderDevice() public method

Initializes a new instance of the ForwarderDevice class.
public ForwarderDevice ( INetMQPoller poller, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System
poller INetMQPoller The to use.
frontendBindAddress string The endpoint used to bind the frontend socket.
backendBindAddress string The endpoint used to bind the backend socket.
mode DeviceMode The for the device.
return System

ForwarderDevice() public method

Initializes a new instance of the ForwarderDevice class.
public ForwarderDevice ( string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System
frontendBindAddress string The endpoint used to bind the frontend socket.
backendBindAddress string The endpoint used to bind the backend socket.
mode DeviceMode The for the device.
return System

FrontendHandler() protected method

This override of FrontendHandler receives data from the socket contained within args, and Sends it to BackendSocket.
protected FrontendHandler ( object sender, NetMQSocketEventArgs args ) : void
sender object unused
args NetMQSocketEventArgs a NetMQSocketEventArgs that contains a Socket for receiving data from
return void