I'm receiving multipart messages on a SUB socket and I want to make my code non-blocking. The docs say that a multipart message is delivered atomically. Can I read that as a guarantee that, if there is a 'more' indication after a previous part, a zmq_recv() on the next part will never block but immediately read the next part?
If I can rely on that guarantee then I only need to use ZMQ_DONTWAIT on the first part, and once that succeeds I can read the whole multipart message atomically without blocking. But that guarantee doesn't seem to be explicitly stated in the docs. Also, the docs for zmq_msg_recv() say: An application that processes multi-part messages must use the *ZMQ_RCVMORE* zmq_getsockopt(3) <http://api.zeromq.org/3-3:zmq_getsockopt> option after calling *zmq_msg_recv()* to determine if there are further parts to receive. Wouldn't it be simpler and more efficient to use zmq_msg_more()? Al
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
