summaryrefslogtreecommitdiff
path: root/src/zmq_engine.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-02-12 15:57:54 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-02-12 15:57:54 +0100
commit36a576370ccfed3c104850b5b95a6ed3870edbea (patch)
treedbe228c0a27b7f75cc47a5b46da09f965e3ec5d3 /src/zmq_engine.cpp
parent7b4cf2a4d040057f6f378cac2cd125513a859c1b (diff)
Multi-hop REQ/REP, part I., tracerouting switched on on XREP socket
Diffstat (limited to 'src/zmq_engine.cpp')
-rw-r--r--src/zmq_engine.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/zmq_engine.cpp b/src/zmq_engine.cpp
index 01fe98c..bda098c 100644
--- a/src/zmq_engine.cpp
+++ b/src/zmq_engine.cpp
@@ -32,10 +32,10 @@ zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_,
io_object_t (parent_),
inpos (NULL),
insize (0),
- decoder (in_batch_size, NULL, 0),
+ decoder (in_batch_size),
outpos (NULL),
outsize (0),
- encoder (out_batch_size, false),
+ encoder (out_batch_size),
inout (NULL),
options (options_),
reconnect (reconnect_)
@@ -160,6 +160,13 @@ void zmq::zmq_engine_t::revive ()
out_event ();
}
+void zmq::zmq_engine_t::traceroute (unsigned char *identity_,
+ size_t identity_size_)
+{
+ encoder.trim_prefix ();
+ decoder.add_prefix (identity_, identity_size_);
+}
+
void zmq::zmq_engine_t::error ()
{
zmq_assert (inout);