From 9f1f823b7b69ced56bdb0416feef71230cc7fd55 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 9 Aug 2009 16:12:09 +0200 Subject: zmq_listener/zmq_connecter implemented --- src/io_object.hpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/io_object.hpp') diff --git a/src/io_object.hpp b/src/io_object.hpp index 2029bfb..4f323ad 100644 --- a/src/io_object.hpp +++ b/src/io_object.hpp @@ -51,15 +51,20 @@ namespace zmq // handler. void process_plug (); + // io_object_t defines a new handler used to disconnect the object + // from the poller object. Implement the handlen in the derived + // classes to ensure sane cleanup. + virtual void process_unplug () = 0; + // Methods to access underlying poller object. - handle_t add_fd (fd_t fd_, struct i_poll_events *events_); + handle_t add_fd (fd_t fd_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); - void add_timer (struct i_poll_events *events_); - void cancel_timer (struct i_poll_events *events_); + void add_timer (); + void cancel_timer (); // i_poll_events interface implementation. void in_event (); @@ -70,12 +75,11 @@ namespace zmq // it when it's being closed. object_t *owner; - // Set to true when object is plugged in. It's responsibility - // of derived object to set the property after the feat. - bool plugged_in; - private: + // Set to true when object is plugged in. + bool plugged_in; + // Set to true when object was terminated before it was plugged in. // In such case destruction is delayed till 'plug' command arrives. bool terminated; -- cgit v1.2.3