2010-02-10 16:18:46 +01:00
|
|
|
zmq_term(3)
|
|
|
|
===========
|
|
|
|
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2010-03-09 18:47:31 +01:00
|
|
|
zmq_term - terminate 0MQ context
|
2010-02-10 16:18:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2010-03-09 18:47:31 +01:00
|
|
|
*int zmq_term (void '*context');*
|
2010-02-10 16:18:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2010-12-01 10:57:37 +01:00
|
|
|
The _zmq_term()_ function shall terminate the 0MQ context 'context'.
|
2010-03-09 18:47:31 +01:00
|
|
|
|
2010-12-01 10:57:37 +01:00
|
|
|
Context termination is performed in the following steps:
|
2010-06-01 22:22:29 +02:00
|
|
|
|
2010-12-01 10:57:37 +01:00
|
|
|
1. Any blocking operations currently in progress on sockets open within
|
|
|
|
'context' shall return immediately with an error code of ETERM. With the
|
|
|
|
exception of _zmq_close()_, any further operations on sockets open within
|
|
|
|
'context' shall fail with an error code of ETERM.
|
2010-06-01 22:22:29 +02:00
|
|
|
|
2010-12-01 10:57:37 +01:00
|
|
|
2. After interrupting all blocking calls, _zmq_term()_ shall _block_ until the
|
|
|
|
following conditions are satisfied:
|
|
|
|
+
|
|
|
|
* All sockets open within 'context' have been closed with _zmq_close()_.
|
2010-06-01 22:22:29 +02:00
|
|
|
|
2010-12-01 10:57:37 +01:00
|
|
|
* For each socket within 'context', all messages sent by the application
|
|
|
|
with _zmq_send()_ have either been physically transferred to a network
|
|
|
|
peer, or the socket's linger period set with the _ZMQ_LINGER_ socket
|
|
|
|
option has expired.
|
|
|
|
|
|
|
|
For further details regarding socket linger behaviour refer to the _ZMQ_LINGER_
|
|
|
|
option in linkzmq:zmq_setsockopt[3].
|
2010-02-10 16:18:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
RETURN VALUE
|
|
|
|
------------
|
2010-03-09 18:47:31 +01:00
|
|
|
The _zmq_term()_ function shall return zero if successful. Otherwise it shall
|
2010-03-10 12:19:39 +01:00
|
|
|
return `-1` and set 'errno' to one of the values defined below.
|
2010-02-10 16:18:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
ERRORS
|
|
|
|
------
|
Added error checking (EFAULT) for null arguments
* Fixed zmq_term, zmq_socket, zmq_close, zmq_setsockopt,
* zmq_getsockopt, zmq_bind, zmq_connect, zmq_send,
* zmq_recv, zmq_poll, zmq_device, zmq_stopwatch_stop
* Updated Reference Manual for these methods
2010-08-08 11:43:32 +02:00
|
|
|
*EFAULT*::
|
|
|
|
The provided 'context' was not valid (NULL).
|
2011-02-09 15:32:15 +01:00
|
|
|
*EINTR*::
|
|
|
|
Termination was interrupted by a signal. It can be restarted if needed.
|
2010-02-10 16:18:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
2010-03-09 18:47:31 +01:00
|
|
|
linkzmq:zmq[7]
|
2010-02-10 16:18:46 +01:00
|
|
|
linkzmq:zmq_init[3]
|
2010-10-30 18:17:53 +02:00
|
|
|
linkzmq:zmq_close[3]
|
|
|
|
linkzmq:zmq_setsockopt[3]
|
2010-02-10 16:18:46 +01:00
|
|
|
|
2010-09-04 15:55:11 +02:00
|
|
|
|
|
|
|
AUTHORS
|
|
|
|
-------
|
|
|
|
The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
|
|
|
|
Martin Lucina <mato@kotelna.sk>.
|