Class Router
Represents an operator that creates a router socket for tracking the identity of received requests so that responses can be matched even if computed concurrently.
Inherited Members
Namespace: Bonsai.ZeroMQ
Assembly: Bonsai.ZeroMQ.dll
Syntax
public class Router : Source<ResponseContext>
Properties
| Improve this Doc View SourceConnectionString
Gets or sets a value specifying the endpoints to attach the socket to.
Declaration
[TypeConverter(typeof(ConnectionStringConverter))]
public string ConnectionString { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceGenerate()
Generates an observable sequence of requests received from a router socket, where the identity of each request is tracked so that responses can be matched even if computed concurrently.
Declaration
public override IObservable<ResponseContext> Generate()
Returns
Type | Description |
---|---|
IObservable<ResponseContext> | An observable sequence of ResponseContext objects representing received requests. |
Overrides
Generate(IObservable<NetMQMessage>)
Creates a router socket that appends an identity to all received messages and reads it back from outgoing messages to determine the peer the message should be routed to.
Declaration
public IObservable<NetMQMessage> Generate(IObservable<NetMQMessage> source)
Parameters
Type | Name | Description |
---|---|---|
IObservable<NetMQ.NetMQMessage> | source | The sequence of NetMQ.NetMQMessage objects representing the multiple part response messages to route back to peers. |
Returns
Type | Description |
---|---|
IObservable<NetMQ.NetMQMessage> | An observable sequence of NetMQ.NetMQMessage objects representing multiple part requests received from the router socket. |