summaryrefslogtreecommitdiff
path: root/src/io_object.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-08-09 16:12:09 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-08-09 16:12:09 +0200
commit9f1f823b7b69ced56bdb0416feef71230cc7fd55 (patch)
treee5aa6ca2b943c62afcc4ca427102693d8f88a14e /src/io_object.hpp
parent3147ff8523d9736039c4582f5f62c323b23940d1 (diff)
zmq_listener/zmq_connecter implemented
Diffstat (limited to 'src/io_object.hpp')
-rw-r--r--src/io_object.hpp18
1 files changed, 11 insertions, 7 deletions
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;