muti-part message functionality available via API

This commit is contained in:
Martin Sustrik 2010-03-27 14:57:56 +01:00
parent 8d8e0857be
commit 842b4dd2e4
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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);