[zeromq-dev] zmq poll failed

Martin Sustrik sustrik at 250bpm.com
Fri Jan 22 08:00:17 CET 2010

Guo, Yanchao wrote:
> Thanks Martin, i missed that bit. It worked with that flag.
> The following maybe a dumb question as I am new to socket programming. 
> What if between two poll calls, there are multiple messages arrive on a 
> tcp socket? How do I know the number of recv I need to issue?

Do a non-blocking recv:

s.recv (&msg, ZMQ_NOBLOCK);

It'll return a message when one is available or EAGAIN if it is not.


More information about the zeromq-dev mailing list