From d13933bc62fce71b5a58118020e0dd3776e79aa9 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Wed, 11 Aug 2010 14:09:56 +0200 Subject: I/O object hierarchy implemented --- src/xreq.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/xreq.cpp') diff --git a/src/xreq.cpp b/src/xreq.cpp index 893c18e..e511660 100644 --- a/src/xreq.cpp +++ b/src/xreq.cpp @@ -23,7 +23,9 @@ #include "err.hpp" zmq::xreq_t::xreq_t (class ctx_t *parent_, uint32_t slot_) : - socket_base_t (parent_, slot_) + socket_base_t (parent_, slot_), + fq (this), + lb (this) { options.requires_in = true; options.requires_out = true; @@ -41,15 +43,18 @@ void zmq::xreq_t::xattach_pipes (class reader_t *inpipe_, lb.attach (outpipe_); } -void zmq::xreq_t::xterm_pipes () +void zmq::xreq_t::process_term () { - fq.term_pipes (); - lb.term_pipes (); + register_term_acks (2); + fq.terminate (); + lb.terminate (); + + socket_base_t::process_term (); } -bool zmq::xreq_t::xhas_pipes () +void zmq::xreq_t::terminated () { - return fq.has_pipes () || lb.has_pipes (); + unregister_term_ack (); } int zmq::xreq_t::xsend (zmq_msg_t *msg_, int flags_) -- cgit v1.2.3