mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 23:01:04 +08:00
Documentation fixes
This commit is contained in:
parent
bc468b3451
commit
98801ebcae
@ -62,7 +62,8 @@ Messages
|
||||
~~~~~~~~
|
||||
A 0MQ message is a discrete unit of data passed between applications or
|
||||
components of the same application. 0MQ messages have no internal structure and
|
||||
from the point of view of 0MQ itself they are considered to be opaque BLOBs.
|
||||
from the point of view of 0MQ itself they are considered to be opaque binary
|
||||
data.
|
||||
|
||||
The following functions are provided to work with messages:
|
||||
|
||||
|
@ -25,7 +25,7 @@ the underlying transport protocol selected.
|
||||
The following transports are defined:
|
||||
|
||||
'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7]
|
||||
'pgm', 'udp':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]
|
||||
'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]
|
||||
'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7]
|
||||
'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7]
|
||||
|
||||
@ -37,7 +37,7 @@ addresses using _zmq_connect()_.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_bind()_ function shall return zero if successful. Otherwise it shall
|
||||
return -1 and set 'errno' to one of the values defined below.
|
||||
return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -26,7 +26,7 @@ also be dropped.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_close()_ function shall return zero if successful. Otherwise it shall
|
||||
return -1 and set 'errno' to one of the values defined below.
|
||||
return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -25,7 +25,7 @@ the underlying transport protocol selected.
|
||||
The following transports are defined:
|
||||
|
||||
'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7]
|
||||
'pgm', 'udp':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]
|
||||
'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]
|
||||
'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7]
|
||||
'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7]
|
||||
|
||||
@ -41,7 +41,7 @@ physical connection was or can actually be established.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_connect()_ function shall return zero if successful. Otherwise it
|
||||
shall return -1 and set 'errno' to one of the values defined below.
|
||||
shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -30,7 +30,7 @@ the queued messages *may* be flushed as a single batch.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_flush()_ function shall return zero if successful. Otherwise it shall
|
||||
return -1 and set 'errno' to one of the values defined below.
|
||||
return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -30,7 +30,7 @@ _zmq_msg_ family of functions.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_msg_close()_ function shall return zero if successful. Otherwise
|
||||
it shall return -1 and set 'errno' to one of the values defined below.
|
||||
it shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -32,7 +32,7 @@ _zmq_msg_ family of functions.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_msg_copy()_ function shall return zero if successful. Otherwise it
|
||||
shall return -1 and set 'errno' to one of the values defined below.
|
||||
shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -25,7 +25,7 @@ _zmq_msg_ family of functions.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_msg_init()_ function shall return zero if successful. Otherwise it
|
||||
shall return -1 and set 'errno' to one of the values defined below.
|
||||
shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -32,7 +32,7 @@ _zmq_msg_ family of functions.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_msg_init_data()_ function shall return zero if successful. Otherwise
|
||||
it shall return -1 and set 'errno' to one of the values defined below.
|
||||
it shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -29,7 +29,7 @@ _zmq_msg_ family of functions.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_msg_init_size()_ function shall return zero if successful. Otherwise
|
||||
it shall return -1 and set 'errno' to one of the values defined below.
|
||||
it shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -27,7 +27,7 @@ _zmq_msg_ family of functions.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_msg_move()_ function shall return zero if successful. Otherwise it
|
||||
shall return -1 and set 'errno' to one of the values defined below.
|
||||
shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -42,9 +42,10 @@ bit corresponding to the event condition in the 'revents' member.
|
||||
|
||||
If none of the requested events have occured on any *zmq_pollitem_t* item,
|
||||
_zmq_poll()_ shall wait up to 'timeout' microseconds for an event to occur on
|
||||
any of the requested items. If the value of 'timeout' is 0, _zmq_poll()_ shall
|
||||
return immediately. If the value of 'timeout' is -1, _zmq_poll()_ shall wait
|
||||
indefinitely for requested events to occur.
|
||||
any of the requested items. If the value of 'timeout' is `0`, _zmq_poll()_
|
||||
shall return immediately. If the value of 'timeout' is `-1`, _zmq_poll()_ shall
|
||||
block indefinitely until a requested event has occured on at least one
|
||||
*zmq_pollitem_t*.
|
||||
|
||||
The 'events' and 'revents' members of *zmq_pollitem_t* are bitmasks constructed
|
||||
by OR'ing a combination of the following event flags:
|
||||
@ -78,9 +79,9 @@ of those interfaces in ways not defined in this documentation.
|
||||
RETURN VALUE
|
||||
------------
|
||||
Upon successful completion, the _zmq_poll()_ function shall return the number
|
||||
of *zmq_pollitem_t* structures with events signaled in 'revents' or 0 if the
|
||||
of *zmq_pollitem_t* structures with events signaled in 'revents' or `0` if the
|
||||
'timeout' period has expired and no events have been signaled. Upon failure,
|
||||
_zmq_poll()_ shall return -1 and set 'errno' to one of the values defined
|
||||
_zmq_poll()_ shall return `-1` and set 'errno' to one of the values defined
|
||||
below.
|
||||
|
||||
|
||||
@ -97,7 +98,7 @@ associated 0MQ 'context' was initialised without the 'ZMQ_POLL' flag.
|
||||
|
||||
EXAMPLE
|
||||
-------
|
||||
.Polling idenfinitely for input events on both a 0MQ socket and a standard socket.
|
||||
.Polling indefinitely for input events on both a 0MQ socket and a standard socket.
|
||||
----
|
||||
zmq_pollitem_t items [2];
|
||||
/* First item refers to 0MQ socket 'socket' */
|
||||
|
@ -32,7 +32,7 @@ to EAGAIN.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_recv()_ function shall return zero if successful. Otherwise it shall
|
||||
return -1 and set 'errno' to one of the values defined below.
|
||||
return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -39,7 +39,7 @@ responsibility for the message.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_send()_ function shall return zero if successful. Otherwise it shall
|
||||
return -1 and set 'errno' to one of the values defined below.
|
||||
return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -109,7 +109,7 @@ queue_ limits shall be shared with previous run(s) and so on.
|
||||
Identity should be at least one byte and at most 255 bytes long. Identities
|
||||
starting with binary zero are reserved for use by 0MQ infrastructure.
|
||||
|
||||
Option value type:: BLOB
|
||||
Option value type:: binary data
|
||||
Option value unit:: N/A
|
||||
Default value:: NULL
|
||||
Applicable socket types:: all
|
||||
@ -127,7 +127,7 @@ with the specified prefix. Mutiple filters may be attached to a single
|
||||
'ZMQ_SUB' socket, in which case a message shall be accepted if it matches at
|
||||
least one filter.
|
||||
|
||||
Option value type:: BLOB
|
||||
Option value type:: binary data
|
||||
Option value unit:: N/A
|
||||
Default value:: N/A
|
||||
Applicable socket types:: ZMQ_SUB
|
||||
@ -141,7 +141,7 @@ established with the 'ZMQ_SUBSCRIBE' option. If the socket has several
|
||||
instances of the same filter attached the 'ZMQ_UNSUBSCRIBE' option shall remove
|
||||
only one instance, leaving the rest in place and functional.
|
||||
|
||||
Option value type:: BLOB
|
||||
Option value type:: binary data
|
||||
Option value unit:: N/A
|
||||
Default value:: N/A
|
||||
Applicable socket types:: ZMQ_SUB
|
||||
@ -150,8 +150,7 @@ Applicable socket types:: ZMQ_SUB
|
||||
ZMQ_RATE: Set multicast data rate
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_RATE' option shall set the maximum send or receive data rate for
|
||||
multicast transports such as linkzmq:zmq_pgm[7] and linkzmq:zmq_udp[7] using
|
||||
the specified 'socket'.
|
||||
multicast transports such as linkzmq:zmq_pgm[7] using the specified 'socket'.
|
||||
|
||||
Option value type:: uint64_t
|
||||
Option value unit:: kilobits per second
|
||||
@ -162,10 +161,9 @@ Applicable socket types:: all, when using multicast transports
|
||||
ZMQ_RECOVERY_IVL: Set multicast recovery interval
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_RECOVERY_IVL' option shall set the recovery interval for multicast
|
||||
transports such as linkzmq:zmq_pgm[7] and linkzmq:zmq_udp[7] using the
|
||||
specified 'socket'. The recovery interval determines the maximum time in
|
||||
seconds that a receiver can be absent from a multicast group before
|
||||
unrecoverable data loss will occur.
|
||||
transports such as linkzmq:zmq_pgm[7] using the specified 'socket'. The
|
||||
recovery interval determines the maximum time in seconds that a receiver can be
|
||||
absent from a multicast group before unrecoverable data loss will occur.
|
||||
|
||||
CAUTION: Excersize care when setting large recovery intervals as the data
|
||||
needed for recovery will be held in memory. For example, a 1 minute recovery
|
||||
@ -221,7 +219,7 @@ Applicable socket types:: all
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it
|
||||
shall return -1 and set 'errno' to one of the values defined below.
|
||||
shall return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
@ -16,7 +16,7 @@ DESCRIPTION
|
||||
-----------
|
||||
The 'zmq_socket()' function shall create a 0MQ socket within the specified
|
||||
'context' and return an opaque handle to the newly created socket. The 'type'
|
||||
argument specifies the _messaging pattern_, which determines the semantics of
|
||||
argument specifies the socket type, which determines the semantics of
|
||||
communication over the socket.
|
||||
|
||||
The following _messaging patterns_ are defined:
|
||||
@ -96,8 +96,9 @@ Socket type:: 'ZMQ_DOWNSTREAM'
|
||||
Compatible peer sockets:: 'ZMQ_UPSTREAM'
|
||||
|
||||
A socket of type 'ZMQ_DOWNSTREAM' is used by a _component_ of a pipeline to
|
||||
send messages to downstream stages of the pipeline. The _zmq_recv()_ function
|
||||
is not implemented for this socket type.
|
||||
send messages to downstream stages of the pipeline. Messages are load-balanced
|
||||
to all connected downstream _components_. The _zmq_recv()_ function is not
|
||||
implemented for this socket type.
|
||||
|
||||
|
||||
RETURN VALUE
|
||||
|
@ -24,7 +24,7 @@ delayed until the last socket within it is closed.
|
||||
RETURN VALUE
|
||||
------------
|
||||
The _zmq_term()_ function shall return zero if successful. Otherwise it shall
|
||||
return -1 and set 'errno' to one of the values defined below.
|
||||
return `-1` and set 'errno' to one of the values defined below.
|
||||
|
||||
|
||||
ERRORS
|
||||
|
Loading…
x
Reference in New Issue
Block a user