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/xrep.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/xrep.hpp') diff --git a/src/xrep.hpp b/src/xrep.hpp index 1c240ff..b16682d 100644 --- a/src/xrep.hpp +++ b/src/xrep.hpp @@ -44,13 +44,16 @@ namespace zmq // Overloads of functions from socket_base_t. void xattach_pipes (reader_t *inpipe_, writer_t *outpipe_, const blob_t &peer_identity_); - void xterm_pipes (); - bool xhas_pipes (); int xsend (zmq_msg_t *msg_, int flags_); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); bool xhas_out (); + private: + + // Hook into the termination process. + void process_term (); + // i_reader_events interface implementation. void activated (reader_t *pipe_); void terminated (reader_t *pipe_); @@ -59,8 +62,6 @@ namespace zmq void activated (writer_t *pipe_); void terminated (writer_t *pipe_); - private: - struct inpipe_t { class reader_t *reader; @@ -100,6 +101,9 @@ namespace zmq // If true, more outgoing message parts are expected. bool more_out; + // If true, termination process is already underway. + bool terminating; + xrep_t (const xrep_t&); void operator = (const xrep_t&); }; -- cgit v1.2.3