diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-10-16 10:53:29 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-10-16 10:53:29 +0200 |
commit | 0a03e86e9547fa7c221b316a5a943467adea3dfd (patch) | |
tree | f47b0cd7d3c91c59de419506f8d66c27e327e41c /doc | |
parent | a1474e305762d32df2b79300d124aac7fa0181c8 (diff) |
ZMQ_LINGER socket option added.
1. ZMQ_LINGER option can be set/get
2. options are part of own_t base class rather than being declared
separately by individual objects
3. Linger option is propagated with "term" command so that the
newest value of it is used rather than the stored old one.
4. Session sets the linger timer if needed and terminates
as soon as it expires.
5. Corresponding documentation updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/zmq_getsockopt.txt | 16 | ||||
-rw-r--r-- | doc/zmq_setsockopt.txt | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index 5fee978..54d6b58 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -212,6 +212,22 @@ Default value:: 0 Applicable socket types:: all +ZMQ_LINGER: Set linger period for socket shutdown +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_LINGER' option shall retrieve the 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. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: -1 +Applicable socket types:: all + + ZMQ_FD: Retrieve file descriptor associated with the socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_FD' option shall retrieve file descriptor associated with the 0MQ diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index a60fc26..5cbdaf6 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -216,6 +216,22 @@ Default value:: 0 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. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: -1 +Applicable socket types:: all + + RETURN VALUE ------------ The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it |