[zeromq-dev] Multi-part messages API

Brian Granger ellisonbg at gmail.com
Mon Apr 12 20:59:21 CEST 2010


This is great, I will update the Python bindings.  I have been busy
lately so I haven't been following as closely.  Have you fixed the
XREP/XREQ sockets and everything to use the new multipart message



On Sun, Apr 11, 2010 at 1:33 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Hi all,
> The current trunk now fully supports multi-part messages.
> To send a multi-part messages, use ZMQ_SNDMORE flag when sending all but
> the last part of the message:
> zmq::message_t part1;
> zmq::message_t part2;
> s.send (part1, ZMQ_SNDMORE);
> s.send (part2);
> On the receiver side recv the messages as normal. To find out whether
> there are more message parts to be received, use ZMQ_RCVMORE socket option:
> while (true) {
>    s.recv (&msg);
>    uint64_t more;
>    size_t sz = sizeof (more);
>    s.getsockopt (ZMQ_RCVMORE, &more, &sz);
>    if (!more)
>        break;
> }
> Not to break the language bindings that define obsoleted ZMQ_MORE
> constant, the constant is still present and synonymous with ZMQ_SNDMORE.
> However, it will be removed for 2.0.7 release and thus the bindings
> should be modified to expose ZMQ_SNDMORE and ZMQ_RCVMORE instead of
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com

More information about the zeromq-dev mailing list