[zeromq-dev] Multi-part messages API

Jon Dyte jon at totient.co.uk
Sun Apr 11 17:22:29 CEST 2010


Martin Sustrik wrote:
> 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;
> }
>
>   

when 'more' is true is the next message data appended into msg via the 
recv call or overwritten?
I'm assuming the latter.....

thanks

jon




More information about the zeromq-dev mailing list