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.hpp | |
parent | ee1f1af0091d9bdffa0e5ce1783da925b3cd7e56 (diff) |
I/O object hierarchy implemented
Diffstat (limited to 'src/sub.hpp')
-rw-r--r-- | src/sub.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sub.hpp b/src/sub.hpp index da69892..a832c48 100644 --- a/src/sub.hpp +++ b/src/sub.hpp @@ -24,12 +24,13 @@ #include "prefix_tree.hpp" #include "socket_base.hpp" +#include "i_terminate_events.hpp" #include "fq.hpp" namespace zmq { - class sub_t : public socket_base_t + class sub_t : public socket_base_t, public i_terminate_events { public: @@ -41,14 +42,18 @@ namespace zmq // Overloads of functions from socket_base_t. void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); - void xterm_pipes (); - bool xhas_pipes (); int xsetsockopt (int option_, const void *optval_, size_t optvallen_); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); private: + // i_terminate_events interface implementation. + void terminated (); + + // Hook into the termination process. + void process_term (); + // Check whether the message matches at least one subscription. bool match (zmq_msg_t *msg_); |