Clarify usage of zmq_close (#2792)

* Clarify usage of zmq_close
This commit is contained in:
Simon Giesecke 2017-10-18 16:27:00 +02:00 committed by Luca Boccassi
parent 2c247271a3
commit cfef04035c

View File

@ -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
_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;
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].
@ -35,7 +39,7 @@ return `-1` and set 'errno' to one of the values defined below.
ERRORS
------
*ENOTSOCK*::
The provided 'socket' was invalid.
The provided 'socket' was NULL.
SEE ALSO