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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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