fszmq


Polling

Namespace: fszmq

Contains methods for working with ZMQ's polling capabilities

Functions and values

Function or valueDescription
poll timeout items
Signature: timeout:int64<'unit> -> items:seq<Poll> -> bool
Type parameters: 'unit

Performs a single polling run across the given sequence of Poll items, waiting up to the given timeout. Returns true when one or more callbacks have been invoked, returns false otherwise.

Note: All items passed to Polling.poll MUST share the same context and belong to the thread calling Polling.poll.

This function is named DoPoll in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.

CompiledName: DoPoll

pollForever items
Signature: items:seq<Poll> -> bool

Calls Polling.poll with the given sequence of Poll items and no timeout, effectively causing the polling loop to block indefinitely.

CompiledName: PollForever

pollIn fn socket
Signature: fn:(Socket -> unit) -> socket:Socket -> Poll

Creates a Poll item for the socket which will invoke the callback when the socket receives a message

CompiledName: PollIn

pollIO fn socket
Signature: fn:(Socket -> unit) -> socket:Socket -> Poll

Creates a Poll item for the socket which will invoke the callback when the socket sends or receives messages

CompiledName: PollIO

pollNow items
Signature: items:seq<Poll> -> bool

Calls Polling.poll with the given sequence of Poll items and 0 microseconds timeout

CompiledName: PollNow

pollOut fn socket
Signature: fn:(Socket -> unit) -> socket:Socket -> Poll

Creates a Poll item for the socket which will invoke the callback when the socket sends a message

CompiledName: PollOut

tryPollInput timeout socket
Signature: timeout:int64<'unit> -> socket:Socket -> byte [] [] option
Type parameters: 'unit

Polls the given socket, up to the given timeout, for an input message. Returns a byte[][] option, where None indicates no message was received.

CompiledName: TryPollInput

Fork me on GitHub