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/sub.cpp | |
parent | ee1f1af0091d9bdffa0e5ce1783da925b3cd7e56 (diff) |
I/O object hierarchy implemented
Diffstat (limited to 'src/sub.cpp')
-rw-r--r-- | src/sub.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sub.cpp b/src/sub.cpp index a1e8fb7..89df106 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -26,6 +26,7 @@ zmq::sub_t::sub_t (class ctx_t *parent_, uint32_t slot_) : socket_base_t (parent_, slot_), + fq (this), has_message (false), more (false) { @@ -46,14 +47,17 @@ void zmq::sub_t::xattach_pipes (class reader_t *inpipe_, fq.attach (inpipe_); } -void zmq::sub_t::xterm_pipes () +void zmq::sub_t::process_term () { - fq.term_pipes (); + register_term_acks (1); + fq.terminate (); + + socket_base_t::process_term (); } -bool zmq::sub_t::xhas_pipes () +void zmq::sub_t::terminated () { - return fq.has_pipes (); + unregister_term_ack (); } int zmq::sub_t::xsetsockopt (int option_, const void *optval_, |