0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-15 18:38:00 +08:00

Merge pull request #60 from hintjens/master

Fixed doc for SNDHWM
This commit is contained in:
Pieter Hintjens 2012-11-18 17:22:24 -08:00
commit 65a29e85ee
2 changed files with 8 additions and 4 deletions

View File

@ -30,8 +30,8 @@ ZMQ_SNDHWM: Set high water mark for outbound messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SNDHWM' option shall set the high water mark for outbound messages on
the specified 'socket'. The high water mark is a hard limit on the maximum
number of outstanding messages 0MQ shall queue in memory for any single peer
that the specified 'socket' is communicating with.
number of outstanding message parts 0MQ shall queue in memory for any single
peer that the specified 'socket' is communicating with.
If this limit has been reached the socket shall enter an exceptional state and
depending on the socket type, 0MQ shall take appropriate action such as
@ -39,6 +39,10 @@ blocking or dropping sent messages. Refer to the individual socket descriptions
in linkzmq:zmq_socket[3] for details on the exact action taken for each socket
type.
NOTE: The high-water mark is measured in individual message parts, including
any delimiter and identity parts. When setting 'ZMQ_SNDHWM' on a 'ZMQ_ROUTER'
socket, note that a message always has at least two parts.
[horizontal]
Option value type:: int
Option value unit:: messages

View File

@ -70,8 +70,8 @@ void zmq::xpub_t::xread_activated (pipe_t *pipe_)
unique = subscriptions.add (data + 1, size - 1, pipe_);
// If the subscription is not a duplicate store it so that it can be
// passed to used on next recv call.
if (options.type == ZMQ_XPUB && (unique || verbose))
// passed to used on next recv call. (Unsubscribe is not verbose.)
if (options.type == ZMQ_XPUB && (unique || (*data && verbose)))
pending.push_back (blob_t (data, size));
}