diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/zmq_decoder.cpp | 4 | ||||
-rw-r--r-- | src/zmq_encoder.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/zmq_decoder.cpp b/src/zmq_decoder.cpp index 34bd618..c7e20e1 100644 --- a/src/zmq_decoder.cpp +++ b/src/zmq_decoder.cpp @@ -112,8 +112,8 @@ bool zmq::zmq_decoder_t::eight_byte_size_ready () bool zmq::zmq_decoder_t::flags_ready () { - // No flags are accepted at the moment. - zmq_assert (tmpbuf [0] == 0); + // Store the flags from the wire into the message structure. + in_progress.flags = tmpbuf [0]; if (prefix.empty ()) { next_step (zmq_msg_data (&in_progress), zmq_msg_size (&in_progress), diff --git a/src/zmq_encoder.cpp b/src/zmq_encoder.cpp index 95d0e5e..d78d04f 100644 --- a/src/zmq_encoder.cpp +++ b/src/zmq_encoder.cpp @@ -97,13 +97,13 @@ bool zmq::zmq_encoder_t::message_ready () // message size. In both cases empty 'flags' field follows. if (size < 255) { tmpbuf [0] = (unsigned char) size; - tmpbuf [1] = 0; + tmpbuf [1] = (in_progress.flags & ~ZMQ_MSG_SHARED); next_step (tmpbuf, 2, &zmq_encoder_t::size_ready, true); } else { tmpbuf [0] = 0xff; put_uint64 (tmpbuf + 1, size); - tmpbuf [9] = 0; + tmpbuf [9] = (in_progress.flags & ~ZMQ_MSG_SHARED); next_step (tmpbuf, 10, &zmq_encoder_t::size_ready, true); } return true; |