C# Class NetMQ.Proxy

Forward messages between two sockets, you can also specify control socket which both sockets will send messages to
ファイルを表示 Open project: somdoron/netmq Class Usage Examples

Public Methods

Method Description
Proxy ( [ frontend, [ backend, [ control = null, [ poller = null ) : System

Create a new instance of a Proxy (NetMQ.Proxy) with the given sockets to serve as a front-end, a back-end, and a control socket.

Proxy ( [ frontend, [ backend, [ controlIn, [ controlOut, [ poller = null ) : System

Create a new instance of a Proxy (NetMQ.Proxy) with the given sockets to serve as a front-end, a back-end, and a control socket.

Start ( ) : void

Start proxying messages between the front and back ends. Blocks, unless using an external NetMQPoller.

Stop ( ) : void

Stops the proxy, blocking until the underlying NetMQPoller has completed.

Private Methods

Method Description
OnBackendReady ( object sender, NetMQSocketEventArgs e ) : void
OnFrontendReady ( object sender, NetMQSocketEventArgs e ) : void
ProxyBetween ( IReceivingSocket from, IOutgoingSocket to, [ control ) : void

Method Details

Proxy() public method

Create a new instance of a Proxy (NetMQ.Proxy) with the given sockets to serve as a front-end, a back-end, and a control socket.
is not null and either or are not contained within it.
public Proxy ( [ frontend, [ backend, [ control = null, [ poller = null ) : System
frontend [ the socket that messages will be forwarded from
backend [ the socket that messages will be forwarded to
control [ this socket will have messages also sent to it - you can set this to null if not needed
poller [ an optional external poller to use within this proxy
return System

Proxy() public method

Create a new instance of a Proxy (NetMQ.Proxy) with the given sockets to serve as a front-end, a back-end, and a control socket.
public Proxy ( [ frontend, [ backend, [ controlIn, [ controlOut, [ poller = null ) : System
frontend [ the socket that messages will be forwarded from
backend [ the socket that messages will be forwarded to
controlIn [ this socket will have incoming messages also sent to it - you can set this to null if not needed
controlOut [ this socket will have outgoing messages also sent to it - you can set this to null if not needed
poller [ an optional external poller to use within this proxy
return System

Start() public method

Start proxying messages between the front and back ends. Blocks, unless using an external NetMQPoller.
The proxy has already been started.
public Start ( ) : void
return void

Stop() public method

Stops the proxy, blocking until the underlying NetMQPoller has completed.
The proxy has not been started.
public Stop ( ) : void
return void