7
zmq_ctx_term - destroy a 0MQ context
12
*int zmq_ctx_term (void '*context');*
17
The _zmq_ctx_term()_ function shall destroy the 0MQ context 'context'.
19
Context termination is performed in the following steps:
21
1. Any blocking operations currently in progress on sockets open within
22
'context' shall return immediately with an error code of ETERM. With the
23
exception of _zmq_close()_, any further operations on sockets open within
24
'context' shall fail with an error code of ETERM.
26
2. After interrupting all blocking calls, _zmq_ctx_term()_ shall _block_ until the
27
following conditions are satisfied:
29
* All sockets open within 'context' have been closed with _zmq_close()_.
31
* For each socket within 'context', all messages sent by the application
32
with _zmq_send()_ have either been physically transferred to a network
33
peer, or the socket's linger period set with the _ZMQ_LINGER_ socket
36
For further details regarding socket linger behavior refer to the _ZMQ_LINGER_
37
option in linkzmq:zmq_setsockopt[3].
39
This function replaces the deprecated function linkzmq:zmq_term[3].
44
The _zmq_ctx_term()_ function shall return zero if successful. Otherwise
45
it shall return `-1` and set 'errno' to one of the values defined below.
51
The provided 'context' was invalid.
53
Termination was interrupted by a signal. It can be restarted if needed.
61
linkzmq:zmq_setsockopt[3]
66
This page was written by the 0MQ community. To make a change please
67
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.