C# Class NetMQ.Devices.QueueDevice

A shared queue that collects requests from a set of clients and distributes these fairly among a set of services.
Requests are fair-queued from frontend connections and load-balanced between backend connections. Replies automatically return to the client that made the original request. This device is part of the request-reply pattern. The frontend speaks to clients and the backend speaks to services.
Inheritance: DeviceBase
Afficher le fichier Open project: NetMQ/NetMQ3-x Class Usage Examples

Méthodes publiques

Méthode Description
QueueDevice ( INetMQPoller poller, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System

Initializes a new instance of the QueueDevice class.

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

Initializes a new instance of the QueueDevice class.

Méthodes protégées

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

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

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

Méthode Description
ForwardTo ( NetMQSocketEventArgs args, IOutgoingSocket toSocket ) : void
QueueDevice ( NetMQContext context, INetMQPoller poller, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System
QueueDevice ( NetMQContext context, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded ) : System

Method Details

BackendHandler() protected méthode

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

FrontendHandler() protected méthode

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 NetMQSocket for receiving data from
Résultat void

QueueDevice() public méthode

Initializes a new instance of the QueueDevice class.
public QueueDevice ( 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.
Résultat System

QueueDevice() public méthode

Initializes a new instance of the QueueDevice class.
public QueueDevice ( 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.
Résultat System