Commit cfef0403 authored by Simon Giesecke's avatar Simon Giesecke Committed by Luca Boccassi

Clarify usage of zmq_close (#2792)

* Clarify usage of zmq_close
parent 2c247271
...@@ -21,6 +21,10 @@ behaviour for discarding messages sent by the application with _zmq_send()_ but ...@@ -21,6 +21,10 @@ behaviour for discarding messages sent by the application with _zmq_send()_ but
not yet physically transferred to the network depends on the value of the not yet physically transferred to the network depends on the value of the
_ZMQ_LINGER_ socket option for the specified 'socket'. _ZMQ_LINGER_ socket option for the specified 'socket'.
_zmq_close()_ must be called exactly once for each socket. If it is never called,
_zmq_ctx_term()_ will block forever. If it is called multiple times for the same
socket or if 'socket' does not point to a socket, the behaviour is undefined.
NOTE: The default setting of _ZMQ_LINGER_ does not discard unsent messages; NOTE: The default setting of _ZMQ_LINGER_ does not discard unsent messages;
this behaviour may cause the application to block when calling _zmq_ctx_term()_. this behaviour may cause the application to block when calling _zmq_ctx_term()_.
For details refer to linkzmq:zmq_setsockopt[3] and linkzmq:zmq_ctx_term[3]. For details refer to linkzmq:zmq_setsockopt[3] and linkzmq:zmq_ctx_term[3].
...@@ -35,7 +39,7 @@ return `-1` and set 'errno' to one of the values defined below. ...@@ -35,7 +39,7 @@ return `-1` and set 'errno' to one of the values defined below.
ERRORS ERRORS
------ ------
*ENOTSOCK*:: *ENOTSOCK*::
The provided 'socket' was invalid. The provided 'socket' was NULL.
SEE ALSO SEE ALSO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment