summaryrefslogtreecommitdiff
path: root/doc/zmq_setsockopt.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/zmq_setsockopt.txt')
-rw-r--r--doc/zmq_setsockopt.txt67
1 files changed, 43 insertions, 24 deletions
diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt
index af92929..86b01e4 100644
--- a/doc/zmq_setsockopt.txt
+++ b/doc/zmq_setsockopt.txt
@@ -171,13 +171,13 @@ Default value:: 10
Applicable socket types:: all, when using multicast transports
-ZMQ_MCAST_LOOP: Control multicast loopback
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ZMQ_MCAST_LOOP: Control multicast loop-back
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_MCAST_LOOP' option shall control whether data sent via multicast
transports using the specified 'socket' can also be received by the sending
-host via loopback. A value of zero disables the loopback functionality, while
-the default value of 1 enables the loopback functionality. Leaving multicast
-loopback enabled when it is not required can have a negative impact on
+host via loop-back. A value of zero disables the loop-back functionality, while
+the default value of 1 enables the loop-back functionality. Leaving multicast
+loop-back enabled when it is not required can have a negative impact on
performance. Where possible, disable 'ZMQ_MCAST_LOOP' in production
environments.
@@ -218,44 +218,63 @@ Applicable socket types:: all
ZMQ_LINGER: Set linger period for socket shutdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The 'ZMQ_LINGER' option shall be set to specify period for pending outbound
-messages to linger in memory after closing the socket. Value of -1 means
-infinite. Pending messages will be kept until they are fully transferred to
-the peer. Value of 0 means that all the pending messages are dropped immediately
-when socket is closed. Positive value means number of milliseconds to keep
-trying to send the pending messages before discarding them.
+The 'ZMQ_LINGER' option shall set the linger period for the specified 'socket'.
+The linger period determines how long pending messages which have yet to be
+sent to a peer shall linger in memory after a socket is closed with
+linkzmq:zmq_close[3], and further affects the termination of the socket's
+context with linkzmq:zmq_term[3]. The following outlines the different
+behaviours:
+
+* The default value of '-1' specifies an infinite linger period. Pending
+ messages shall not be discarded after a call to _zmq_close()_; attempting to
+ terminate the socket's context with _zmq_term()_ shall block until all
+ pending messages have been sent to a peer.
+
+* The value of '0' specifies no linger period. Pending messages shall be
+ discarded immediately when the socket is closed with _zmq_close()_.
+
+* Positive values specify an upper bound for the linger period in milliseconds.
+ Pending messages shall not be discarded after a call to _zmq_close()_;
+ attempting to terminate the socket's context with _zmq_term()_ shall block
+ until either all pending messages have been sent to a peer, or the linger
+ period expires, after which any pending messages shall be discarded.
[horizontal]
Option value type:: int
Option value unit:: milliseconds
-Default value:: -1
+Default value:: -1 (infinite)
Applicable socket types:: all
-ZMQ_RECONNECT_IVL: Set reconnect period for connection-based transports
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The 'ZMQ_RECONNECT_IVL' option shall be set to specify how long it takes for a
-disconnected underlying connection to attempt to reconnect. The interval
-can be randomized to some extent by 0MQ to prevent reconnection storms.
+ZMQ_RECONNECT_IVL: Set reconnection interval
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_RECONNECT_IVL' option shall set the reconnection interval for the
+specified 'socket'. The reconnection interval is the maximum period 0MQ shall
+wait between attempts to reconnect disconnected peers when using
+connection-oriented transports.
+
+NOTE: The reconnection interval may be randomized by 0MQ to prevent
+reconnection storms in topologies with a large number of peers per socket.
[horizontal]
Option value type:: int
Option value unit:: milliseconds
Default value:: 100
-Applicable socket types:: all
+Applicable socket types:: all, only for connection-oriented transports
-ZMQ_BACKLOG: Set maximum length of the queue of pending connections
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The 'ZMQ_BACKLOG' option shall be set to specify maximum size of the
-pending connection backlog for connection-based transports. For details
-refer to your operating system documentation for the 'listen' function.
+ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_BACKLOG' option shall set the maximum length of the queue of
+outstanding peer connections for the specified 'socket'; this only applies to
+connection-oriented transports. For details refer to your operating system
+documentation for the 'listen' function.
[horizontal]
Option value type:: int
Option value unit:: connections
Default value:: 100
-Applicable socket types:: all
+Applicable socket types:: all, only for connection-oriented transports.
RETURN VALUE