summaryrefslogtreecommitdiff
path: root/src/sub.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-03-27 21:25:40 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-03-27 21:25:40 +0100
commit2f219d7c287cd518bc77b576e507d7a17c9535e9 (patch)
tree02020070a444165da6bbc43c0ea11a8a2ee98a6b /src/sub.cpp
parent842b4dd2e492459cbc0cc79ffdb34ddab8f0b528 (diff)
ZMQ_TBC renamed to ZMQ_MORE
Diffstat (limited to 'src/sub.cpp')
-rw-r--r--src/sub.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sub.cpp b/src/sub.cpp
index fd3176f..eeb50cd 100644
--- a/src/sub.cpp
+++ b/src/sub.cpp
@@ -27,7 +27,7 @@
zmq::sub_t::sub_t (class app_thread_t *parent_) :
socket_base_t (parent_),
has_message (false),
- tbc (false)
+ more (false)
{
options.requires_in = true;
options.requires_out = false;
@@ -106,7 +106,7 @@ int zmq::sub_t::xrecv (zmq_msg_t *msg_, int flags_)
if (has_message) {
zmq_msg_move (msg_, &message);
has_message = false;
- tbc = msg_->flags & ZMQ_MSG_TBC;
+ more = msg_->flags & ZMQ_MSG_MORE;
return 0;
}
@@ -125,14 +125,14 @@ int zmq::sub_t::xrecv (zmq_msg_t *msg_, int flags_)
// Check whether the message matches at least one subscription.
// Non-initial parts of the message are passed
- if (tbc || match (msg_)) {
- tbc = msg_->flags & ZMQ_MSG_TBC;
+ if (more || match (msg_)) {
+ more = msg_->flags & ZMQ_MSG_MORE;
return 0;
}
// Message doesn't match. Pop any remaining parts of the message
// from the pipe.
- while (msg_->flags & ZMQ_MSG_TBC) {
+ while (msg_->flags & ZMQ_MSG_MORE) {
rc = fq.recv (msg_, ZMQ_NOBLOCK);
zmq_assert (rc == 0);
}
@@ -142,7 +142,7 @@ int zmq::sub_t::xrecv (zmq_msg_t *msg_, int flags_)
bool zmq::sub_t::xhas_in ()
{
// There are subsequent parts of the partly-read message available.
- if (tbc)
+ if (more)
return true;
// If there's already a message prepared by a previous call to zmq_poll,
@@ -172,7 +172,7 @@ bool zmq::sub_t::xhas_in ()
// Message doesn't match. Pop any remaining parts of the message
// from the pipe.
- while (message.flags & ZMQ_MSG_TBC) {
+ while (message.flags & ZMQ_MSG_MORE) {
rc = fq.recv (&message, ZMQ_NOBLOCK);
zmq_assert (rc == 0);
}