summaryrefslogtreecommitdiff
path: root/src/socket_base.hpp
diff options
context:
space:
mode:
authormalosek <malosek@fastmq.com>2009-10-05 10:22:31 +0200
committermalosek <malosek@fastmq.com>2009-10-05 10:22:31 +0200
commitd57ee0984ac3f8712063a7f83d7200be25ca5513 (patch)
treea956443e70c48ebd21242c11cc015db61c53c682 /src/socket_base.hpp
parentff65e26ce7567ea6a907e566f8530f4988231d68 (diff)
parent4efe2366d7394e8969fc9aa64c50be6842d8455f (diff)
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'src/socket_base.hpp')
-rw-r--r--src/socket_base.hpp12
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;