summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-03-26 10:38:40 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-03-26 10:38:40 +0100
commitabb184a051b592b6d4c99fd3299e78ea7c1da826 (patch)
treecbbe7a6778c728710dbdb3ba16489db7b0e91202 /src
parentbc4a1ce3345f4e5904e4b13c618f90def21256a5 (diff)
ZMQ_NOBLOCK renamed ZMQ_DONTWAIT
Done because of POSIX compliance Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src')
-rw-r--r--src/socket_base.cpp4
-rw-r--r--src/xsub.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index bf873b6..b1d1142 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -478,7 +478,7 @@ int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_)
// In case of non-blocking send we'll simply propagate
// the error - including EAGAIN - upwards.
- if (flags_ & ZMQ_NOBLOCK)
+ if (flags_ & ZMQ_DONTWAIT)
return -1;
// Oops, we couldn't send the message. Wait for the next
@@ -533,7 +533,7 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
// For non-blocking recv, commands are processed in case there's an
// activate_reader command already waiting int a command pipe.
// If it's not, return EAGAIN.
- if (flags_ & ZMQ_NOBLOCK) {
+ if (flags_ & ZMQ_DONTWAIT) {
if (errno != EAGAIN)
return -1;
if (unlikely (process_commands (false, false) != 0))
diff --git a/src/xsub.cpp b/src/xsub.cpp
index 8c77925..b0c5795 100644
--- a/src/xsub.cpp
+++ b/src/xsub.cpp
@@ -119,7 +119,7 @@ int zmq::xsub_t::xrecv (zmq_msg_t *msg_, int flags_)
// Message doesn't match. Pop any remaining parts of the message
// from the pipe.
while (msg_->flags & ZMQ_MSG_MORE) {
- rc = fq.recv (msg_, ZMQ_NOBLOCK);
+ rc = fq.recv (msg_, ZMQ_DONTWAIT);
zmq_assert (rc == 0);
}
}
@@ -141,7 +141,7 @@ bool zmq::xsub_t::xhas_in ()
while (true) {
// Get a message using fair queueing algorithm.
- int rc = fq.recv (&message, ZMQ_NOBLOCK);
+ int rc = fq.recv (&message, ZMQ_DONTWAIT);
// If there's no message available, return immediately.
// The same when error occurs.
@@ -159,7 +159,7 @@ bool zmq::xsub_t::xhas_in ()
// Message doesn't match. Pop any remaining parts of the message
// from the pipe.
while (message.flags & ZMQ_MSG_MORE) {
- rc = fq.recv (&message, ZMQ_NOBLOCK);
+ rc = fq.recv (&message, ZMQ_DONTWAIT);
zmq_assert (rc == 0);
}
}