0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 01:37:56 +08:00

Problem: docs are still referring to deprecated zmq_term

Solution: Replace with `zmq_ctx_term`
This commit is contained in:
Constantin Rack 2016-02-01 22:00:35 +01:00
parent 589464ced9
commit a26bb743d4
7 changed files with 15 additions and 15 deletions

View File

@ -52,7 +52,7 @@ int main (void)
// Child process
// Immediately close parent sockets and context
zmq_close (pull);
zmq_term (ctx);
zmq_ctx_term (ctx);
// Create new context, socket, connect and send some messages
void *child_ctx = zmq_ctx_new ();

View File

@ -22,8 +22,8 @@ not yet physically transferred to the network depends on the value of the
_ZMQ_LINGER_ socket option for the specified 'socket'.
NOTE: The default setting of _ZMQ_LINGER_ does not discard unsent messages;
this behaviour may cause the application to block when calling _zmq_term()_.
For details refer to linkzmq:zmq_setsockopt[3] and linkzmq:zmq_term[3].
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].
RETURN VALUE
@ -41,7 +41,7 @@ The provided 'socket' was invalid.
SEE ALSO
--------
linkzmq:zmq_socket[3]
linkzmq:zmq_term[3]
linkzmq:zmq_ctx_term[3]
linkzmq:zmq_setsockopt[3]
linkzmq:zmq[7]

View File

@ -30,7 +30,7 @@ applications receive termination messages, and then terminate the context
with 'ZMQ_LINGER' set to zero on all sockets. This setting is an easier way
to get the same result. When 'ZMQ_BLOCKY' is set to false, all new sockets
are given a linger timeout of zero. You must still close all sockets before
calling zmq_term.
calling zmq_ctx_term.
[horizontal]
Default value:: true (old behavior)

View File

@ -25,8 +25,8 @@ _ZMQ_LINGER_ socket option for the specified 'socket'.
The 'endpoint' argument is as described in linkzmq:zmq_connect[3]
NOTE: The default setting of _ZMQ_LINGER_ does not discard unsent messages;
this behaviour may cause the application to block when calling _zmq_term()_.
For details refer to linkzmq:zmq_setsockopt[3] and linkzmq:zmq_term[3].
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].
RETURN VALUE

View File

@ -349,12 +349,12 @@ The 'ZMQ_LINGER' option shall retrieve the linger period for the specified
'socket'. The linger period determines how long pending messages which have
yet to be sent to a peer shall linger in memory after a socket is closed with
linkzmq:zmq_close[3], and further affects the termination of the socket's
context with linkzmq:zmq_term[3]. The following outlines the different
context with linkzmq:zmq_ctx_term[3]. The following outlines the different
behaviours:
* The default value of '-1' specifies an infinite linger period. Pending
messages shall not be discarded after a call to _zmq_close()_; attempting to
terminate the socket's context with _zmq_term()_ shall block until all
terminate the socket's context with _zmq_ctx_term()_ shall block until all
pending messages have been sent to a peer.
* The value of '0' specifies no linger period. Pending messages shall be
@ -362,7 +362,7 @@ behaviours:
* Positive values specify an upper bound for the linger period in milliseconds.
Pending messages shall not be discarded after a call to _zmq_close()_;
attempting to terminate the socket's context with _zmq_term()_ shall block
attempting to terminate the socket's context with _zmq_ctx_term()_ shall block
until either all pending messages have been sent to a peer, or the linger
period expires, after which any pending messages shall be discarded.

View File

@ -43,7 +43,7 @@ An invalid number of 'io_threads' was requested.
SEE ALSO
--------
linkzmq:zmq[7]
linkzmq:zmq_term[3]
linkzmq:zmq_ctx_term[3]
AUTHORS

View File

@ -385,12 +385,12 @@ The 'ZMQ_LINGER' option shall set the linger period for the specified 'socket'.
The linger period determines how long pending messages which have yet to be
sent to a peer shall linger in memory after a socket is disconnected with
linkzmq:zmq_disconnect[3] or closed with linkzmq:zmq_close[3], and further
affects the termination of the socket's context with linkzmq:zmq_term[3]. The
following outlines the different behaviours:
affects the termination of the socket's context with linkzmq:zmq_ctx_term[3].
The following outlines the different behaviours:
* A value of '-1' specifies an infinite linger period. Pending
messages shall not be discarded after a call to _zmq_disconnect()_ or
_zmq_close()_; attempting to terminate the socket's context with _zmq_term()_
_zmq_close()_; attempting to terminate the socket's context with _zmq_ctx_term()_
shall block until all pending messages have been sent to a peer.
* The value of '0' specifies no linger period. Pending messages shall be
@ -398,7 +398,7 @@ following outlines the different behaviours:
* Positive values specify an upper bound for the linger period in milliseconds.
Pending messages shall not be discarded after a call to _zmq_disconnect()_ or
_zmq_close()_; attempting to terminate the socket's context with _zmq_term()_
_zmq_close()_; attempting to terminate the socket's context with _zmq_ctx_term()_
shall block until either all pending messages have been sent to a peer, or the
linger period expires, after which any pending messages shall be discarded.