diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-08-11 14:09:56 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-08-25 15:39:20 +0200 |
commit | d13933bc62fce71b5a58118020e0dd3776e79aa9 (patch) | |
tree | 6586d5b9cc637dbf8acae4b32d24da9c8e046014 /src/push.cpp | |
parent | ee1f1af0091d9bdffa0e5ce1783da925b3cd7e56 (diff) |
I/O object hierarchy implemented
Diffstat (limited to 'src/push.cpp')
-rw-r--r-- | src/push.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/push.cpp b/src/push.cpp index 3a3d258..f587cef 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -24,7 +24,8 @@ #include "pipe.hpp" zmq::push_t::push_t (class ctx_t *parent_, uint32_t slot_) : - socket_base_t (parent_, slot_) + socket_base_t (parent_, slot_), + lb (this) { options.requires_in = false; options.requires_out = true; @@ -41,14 +42,17 @@ void zmq::push_t::xattach_pipes (class reader_t *inpipe_, lb.attach (outpipe_); } -void zmq::push_t::xterm_pipes () +void zmq::push_t::process_term () { - lb.term_pipes (); + register_term_acks (1); + lb.terminate (); + + socket_base_t::process_term (); } -bool zmq::push_t::xhas_pipes () +void zmq::push_t::terminated () { - return lb.has_pipes (); + unregister_term_ack (); } int zmq::push_t::xsend (zmq_msg_t *msg_, int flags_) |