summaryrefslogtreecommitdiff
path: root/src/xrep.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-12-17 10:14:32 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-12-17 10:14:32 +0100
commit91fdedf25c4d76b0ec0aeb5d1d9f1c9a1a769447 (patch)
tree80cad8945174939473ccfc4409cb70eb53b2e459 /src/xrep.hpp
parentf9eb763293014f812dac5558be5c5f03bb896efb (diff)
Fix polling on XREP socket
When polling on XREP socket in incoming message part was prefetched, but not the identity of sender. The problem is fixed by this patch. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/xrep.hpp')
-rw-r--r--src/xrep.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xrep.hpp b/src/xrep.hpp
index df82d00..65bd564 100644
--- a/src/xrep.hpp
+++ b/src/xrep.hpp
@@ -67,8 +67,12 @@ namespace zmq
// Fair queueing object for inbound pipes.
fq_t fq;
- // Have we prefetched a message.
- bool prefetched;
+ // This value is either 0 (nothing is prefetched), 1 (only message body
+ // is prefetched) or 2 (both identity and message body are prefetched).
+ int prefetched;
+
+ // Holds the prefetched identity.
+ blob_t prefetched_id;
// Holds the prefetched message.
msg_t prefetched_msg;