fszmq


Context

Namespace: fszmq

Contains methods for working with Context instances

Functions and values

Function or valueDescription
configure context options
Signature: context:Context -> options:seq<int * int> -> unit

Sets the given block of option values for the given Context

CompiledName: Configure

dealer context
Signature: context:Context -> Socket

Creates an advanced socket type used for extending the request/reply pattern. When a ZMQ.DEALER socket is connected to a ZMQ.REP socket, each message sent must consist of an empty message part, the delimiter, followed by one or more body parts.

CompiledName: Dealer

getOption context contextOption
Signature: context:Context -> contextOption:int -> int

Gets the value of the given option for the given Context

CompiledName: GetOption

newSocket context socketType
Signature: context:Context -> socketType:int<MeasureProduct<SocketType,MeasureOne>> -> Socket

Creates a Socket, of the given type, within the given context

CompiledName: Socket

pair context
Signature: context:Context -> Socket

Creates a peer connected to exactly one other peer. This socket type is used primarily for inter-thread communication across the "inproc" transport.

CompiledName: Pair

pub context
Signature: context:Context -> Socket

Creates a publisher used to distribute messages to subscribers.

Note: topical filtering will be done at the subscriber (after receiving messages)

CompiledName: Pub

pull context
Signature: context:Context -> Socket

Creates a pipeline node to receive messages from upstream (ZMQ.PUSH) nodes.

CompiledName: Pull

push context
Signature: context:Context -> Socket

Creates a pipeline node to send messages to downstream (ZMQ.PULL) nodes.

CompiledName: Push

rep context
Signature: context:Context -> Socket

Creates a service to receive requests from and send replies to a client. This socket type allows only an alternating sequence of Socket.recv(reply) followed by Socket.send(request) calls.

CompiledName: Rep

req context
Signature: context:Context -> Socket

Creates a client for sending requests to and receiving replies from a service. This socket type allows only an alternating sequence of Socket.send(request) followed by Socket.recv(reply) calls.

CompiledName: Req

router context
Signature: context:Context -> Socket

Creates an advanced socket type used for extending the request/reply pattern. When receiving messages a ZMQ.ROUTER socket prepends a message part containing the identity of the originating peer. When sending messages a ZMQ.ROUTER socket removes the first part of the message and uses it to determine the identity of the recipient.

CompiledName: Router

setOption context (contextOption, value)
Signature: context:Context -> (contextOption:int * value:int) -> unit

Sets the given option value for the given Context

CompiledName: SetOption

stream context
Signature: context:Context -> Socket

Creates a socket which can, asynchronously, send data to or receive data from an non-ZeroMQ peer (via the "TCP" transport). Note: each message should begin with a peer identity. Additionally, a ZMQ.STREAM socket can act as client or a server. When acting as a server, the socket MUST set the ZMQ.SENDMORE flag. When acting as a client, the ZMQ.SENDMORE flag is ignored. Sending an identity followed by an empty frame, closes the connection.

CompiledName: Stream

sub context
Signature: context:Context -> Socket

Creates a subscriber to receive to data distributed by a publisher. Initially a ZMQ.SUB socket is not subscribed to any messages (i.e. one, or more, subscriptions must be applied, via Socket.setOption, before any messages will be received).

CompiledName: Sub

xpub context
Signature: context:Context -> Socket

Behaves the same as a publisher, except this socket type may also receive subscription messages from peers.

Note: topical filtering will be done at the publisher (before sending messages)

CompiledName: XPub

xsub context
Signature: context:Context -> Socket

Behaves the same as a subscriber, except topical filtering is done by sending subscription messages to the publisher. Subscriptions are made by sending a subscription message, in which the first byte is 1 or 0 (subscribe or unsubscribe) and the remainder of the message is the topic

CompiledName: XSub

Fork me on GitHub