Hi, On Wed, Oct 31, 2012 at 5:03 AM, Kah-Chan Low <[email protected]> wrote: > I have read about the caveats of using ZMQ_FD so once an event is triggered, > I do use ZMQ_EVENTS to test for ZMQ_POLLIN before calling zmq_recv() > I also make use that I read all messages off a socket once a read event i > triggered. > [...] > I have read that some people had similar problems and they were advised to > keep reading until EAGAIN before calling select(). I can't do that since the > ZMQ dealer is only one of a number of sockets owned by the thread and any > one of them may receive a message at any time. >
I'm not sure how those two paragraphs are connected. Do you check for ZMQ_EVENTS until it gets becomes unreadable, instead of doing zmq_recv until EAGAIN? If you are, that's ok. You must also check for ZMQ_EVENTS after each zmq_send, before calling select. -- Paul _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
