C# Class MSA.Zmq.JsonRpc.Router

Router is a device that will accept all client requests and forwarded to services and in turns forward the replies from services back to clients Pattern: ROUTER - DEALER + control channel
Inheritance: JsonRpcZmqBase
Exibir arquivo Open project: kadekcipta/ZmqJsonRpc

Public Methods

Method Description
Create ( uint frontendPort, uint backendPort, ZmqContext context ) : Router

Currently supports only single address *, no multihomed interface yet We will wait for other situation when it's needed

Router ( uint frontendPort, uint backendPort, ZmqContext context ) : System
Start ( ) : void
Stop ( ) : void

Private Methods

Method Description
IsStopCommand ( string data ) : bool
PrepareSockets ( ) : void

+------------+ _____ W <--> | ROUTER | / W <--> o|B F|o <----- W <--> | DEALER | \_____ +------------+

RelayMessage ( ZmqSocket source, ZmqSocket destination ) : void
StartRouting ( ) : void
StopRouting ( ) : void
_backendSocket_ReceiveReady ( object sender, ZeroMQ.SocketEventArgs e ) : void
_backendSocket_SendReady ( object sender, ZeroMQ.SocketEventArgs e ) : void
_frontendSocket_ReceiveReady ( object sender, ZeroMQ.SocketEventArgs e ) : void
_frontendSocket_SendReady ( object sender, ZeroMQ.SocketEventArgs e ) : void

Method Details

Create() public static method

Currently supports only single address *, no multihomed interface yet We will wait for other situation when it's needed
public static Create ( uint frontendPort, uint backendPort, ZmqContext context ) : Router
frontendPort uint
backendPort uint
context ZmqContext
return Router

Router() public method

public Router ( uint frontendPort, uint backendPort, ZmqContext context ) : System
frontendPort uint
backendPort uint
context ZmqContext
return System

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void