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/rep.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/rep.cpp')
-rw-r--r-- | src/rep.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rep.cpp b/src/rep.cpp index 8878bcd..b987d9c 100644 --- a/src/rep.cpp +++ b/src/rep.cpp @@ -42,7 +42,7 @@ int zmq::rep_t::xsend (msg_t *msg_, int flags_) return -1; } - bool more = (msg_->flags () & msg_t::more); + bool more = msg_->flags () & (msg_t::more | msg_t::label); // Push message to the reply pipe. int rc = xrep_t::xsend (msg_, flags_); @@ -77,7 +77,7 @@ int zmq::rep_t::xrecv (msg_t *msg_, int flags_) if (rc != 0) return rc; - if (msg_->flags () & msg_t::more) { + if (msg_->flags () & (msg_t::more | msg_t::label)) { // Empty message part delimits the traceback stack. bool bottom = (msg_->size () == 0); @@ -111,7 +111,7 @@ int zmq::rep_t::xrecv (msg_t *msg_, int flags_) return rc; // If whole request is read, flip the FSM to reply-sending state. - if (!(msg_->flags () & msg_t::more)) { + if (!(msg_->flags () & (msg_t::more | msg_t::label))) { sending_reply = true; request_begins = true; } |