summaryrefslogtreecommitdiff
path: root/src/io_object.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-08-09 09:24:48 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-08-09 09:24:48 +0200
commit5b5b513330e96e3e08d0c2c60d03044091976420 (patch)
tree1eb97606ff6827760c0b063aca95470df6ae20a1 /src/io_object.hpp
parenta8b410e66c3c75809c8e9c01dd3e35c579f02347 (diff)
socket options interface modeled as in BSD sockets
Diffstat (limited to 'src/io_object.hpp')
-rw-r--r--src/io_object.hpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/io_object.hpp b/src/io_object.hpp
index 5ed1830..ddb4414 100644
--- a/src/io_object.hpp
+++ b/src/io_object.hpp
@@ -21,6 +21,7 @@
#define __ZMQ_IO_OBJECT_HPP_INCLUDED__
#include "object.hpp"
+#include "i_poller.hpp"
namespace zmq
{
@@ -31,7 +32,7 @@ namespace zmq
// I/O object will live in the thread inherited from the parent.
// However, it's lifetime is managed by the owner.
- io_object_t (object_t *parent_, object_t *owner_);
+ io_object_t (class io_thread_t *parent_, object_t *owner_);
protected:
@@ -44,15 +45,27 @@ namespace zmq
// of I/O object correctly.
virtual ~io_object_t ();
- private:
-
- // Handlers for incoming commands.
- void process_term ();
+ // Methods to access underlying poller object.
+ handle_t add_fd (fd_t fd_, struct i_poll_events *events_);
+ 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_);
// Socket owning this I/O object. It is responsible for destroying
// it when it's being closed.
object_t *owner;
+ private:
+
+ struct i_poller *poller;
+
+ // Handlers for incoming commands.
+ void process_term ();
+
io_object_t (const io_object_t&);
void operator = (const io_object_t&);
};