From cc631c4c6649b0d67114db13386a949426e35dbf Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 1 Oct 2009 10:56:17 +0200 Subject: ZMQII-18: Implement I/O multiplexing (first approximation) --- src/req.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/req.cpp') diff --git a/src/req.cpp b/src/req.cpp index 63409ce..93a46e8 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -195,4 +195,17 @@ int zmq::req_t::xrecv (zmq_msg_t *msg_, int flags_) return 0; } +bool zmq::req_t::xhas_in () +{ + if (reply_pipe->check_read ()) + return waiting_for_reply; + + return false; +} + +bool zmq::req_t::xhas_out () +{ + return !waiting_for_reply; +} + -- cgit v1.2.3