diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-03-27 14:57:56 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-03-27 14:57:56 +0100 |
commit | 842b4dd2e492459cbc0cc79ffdb34ddab8f0b528 (patch) | |
tree | a0ee671c8624db7a058d0d6b8ac78fd8d4a0ed73 | |
parent | 8d8e0857be3d2ab941de443e436061ef82752c17 (diff) |
muti-part message functionality available via API
-rw-r--r-- | include/zmq.h | 1 | ||||
-rw-r--r-- | src/socket_base.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/zmq.h b/include/zmq.h index 1d99254..321b0ac 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -181,6 +181,7 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_RCVBUF 12 #define ZMQ_NOBLOCK 1 +#define ZMQ_TBC 2 ZMQ_EXPORT void *zmq_socket (void *context, int type); ZMQ_EXPORT int zmq_close (void *s); diff --git a/src/socket_base.cpp b/src/socket_base.cpp index f038dc9..40e0ccc 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -311,6 +311,11 @@ int zmq::socket_base_t::connect (const char *addr_) int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_) { + // ZMQ_TBC is actually a message flag, not a real send-flag + // such as ZMQ_NOBLOCK. At this point we impose it on the message. + if (flags_ & ZMQ_TBC) + msg_->flags |= ZMQ_MSG_TBC; + // Process pending commands, if any. app_thread->process_commands (false, true); |