summaryrefslogtreecommitdiff
path: root/src/pull.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-08-11 14:09:56 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-08-25 15:39:20 +0200
commitd13933bc62fce71b5a58118020e0dd3776e79aa9 (patch)
tree6586d5b9cc637dbf8acae4b32d24da9c8e046014 /src/pull.cpp
parentee1f1af0091d9bdffa0e5ce1783da925b3cd7e56 (diff)
I/O object hierarchy implemented
Diffstat (limited to 'src/pull.cpp')
-rw-r--r--src/pull.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/pull.cpp b/src/pull.cpp
index 4f4a8b3..e7b5239 100644
--- a/src/pull.cpp
+++ b/src/pull.cpp
@@ -23,7 +23,8 @@
#include "err.hpp"
zmq::pull_t::pull_t (class ctx_t *parent_, uint32_t slot_) :
- socket_base_t (parent_, slot_)
+ socket_base_t (parent_, slot_),
+ fq (this)
{
options.requires_in = true;
options.requires_out = false;
@@ -40,14 +41,17 @@ void zmq::pull_t::xattach_pipes (class reader_t *inpipe_,
fq.attach (inpipe_);
}
-void zmq::pull_t::xterm_pipes ()
+void zmq::pull_t::process_term ()
{
- fq.term_pipes ();
+ register_term_acks (1);
+ fq.terminate ();
+
+ socket_base_t::process_term ();
}
-bool zmq::pull_t::xhas_pipes ()
+void zmq::pull_t::terminated ()
{
- return fq.has_pipes ();
+ unregister_term_ack ();
}
int zmq::pull_t::xrecv (zmq_msg_t *msg_, int flags_)