diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-06-20 11:33:54 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-06-20 11:33:54 +0200 |
commit | ab99975ad44ed0fe9ab651f31cc47d493e7fb77e (patch) | |
tree | ec7d05592886bf48cb4ed60d10aa8f5eaf02dacd /src/req.cpp | |
parent | ada5d424721c0c0139b8011a5e9de348d061ba2f (diff) |
LABEL flag added to the wire format
So far there was no distinction between message parts used by 0MQ
and message parts used by user. Now, the message parts used by 0MQ
are marked as 'LABEL'.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/req.cpp')
-rw-r--r-- | src/req.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/req.cpp b/src/req.cpp index 6bf502f..b0e58dc 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -48,14 +48,14 @@ int zmq::req_t::xsend (msg_t *msg_, int flags_) msg_t prefix; int rc = prefix.init (); errno_assert (rc == 0); - prefix.set_flags (msg_t::more); + prefix.set_flags (msg_t::label); rc = xreq_t::xsend (&prefix, flags_); if (rc != 0) return rc; message_begins = false; } - bool more = msg_->flags () & msg_t::more; + bool more = msg_->flags () & (msg_t::more | msg_t::label); int rc = xreq_t::xsend (msg_, flags_); if (rc != 0) @@ -83,7 +83,7 @@ int zmq::req_t::xrecv (msg_t *msg_, int flags_) int rc = xreq_t::xrecv (msg_, flags_); if (rc != 0) return rc; - zmq_assert (msg_->flags () & msg_t::more); + zmq_assert (msg_->flags () & msg_t::label); zmq_assert (msg_->size () == 0); message_begins = false; } @@ -93,7 +93,7 @@ int zmq::req_t::xrecv (msg_t *msg_, int flags_) return rc; // If the reply is fully received, flip the FSM into request-sending state. - if (!(msg_->flags () & msg_t::more)) { + if (!(msg_->flags () & (msg_t::more | msg_t::label))) { receiving_reply = false; message_begins = true; } |