diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-10-01 10:56:17 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-10-01 10:56:17 +0200 |
commit | cc631c4c6649b0d67114db13386a949426e35dbf (patch) | |
tree | fa558bc758a12d924dd81b3cd3cd27ebd7418aae /src/socket_base.hpp | |
parent | f2ff2c6e5c4e244dea28e1ac6ec3f886b7ebc356 (diff) |
ZMQII-18: Implement I/O multiplexing (first approximation)
Diffstat (limited to 'src/socket_base.hpp')
-rw-r--r-- | src/socket_base.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/socket_base.hpp b/src/socket_base.hpp index c54efae..49ff5a5 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -54,6 +54,16 @@ namespace zmq int recv (zmq_msg_t *msg_, int flags_); int close (); + // This function is used by the polling mechanism to determine + // whether the socket belongs to the application thread the poll + // is called from. + class app_thread_t *get_thread (); + + // These functions are used by the polling mechanism to determine + // which events are to be reported from this socket. + bool has_in (); + bool has_out (); + // The list of sessions cannot be accessed via inter-thread // commands as it is unacceptable to wait for the completion of the // action till user application yields control of the application @@ -88,6 +98,8 @@ namespace zmq virtual int xsend (zmq_msg_t *msg_, int options_) = 0; virtual int xflush () = 0; virtual int xrecv (zmq_msg_t *msg_, int options_) = 0; + virtual bool xhas_in () = 0; + virtual bool xhas_out () = 0; // Socket options. options_t options; |