Hi, On Wed, Oct 31, 2012 at 9:02 PM, Kah-Chan Low <[email protected]> wrote: > Thanks Paul! > I followed your advice and checked for ZMQ_EVENTS after each each zmq_send() > and it worked! > > I am still puzzled. > 1. Checking for ZMQ_EVENT somehow resets the trigger, even if there is no > message to be read. Why is this necessary?
All of the zmq_send(), zmq_recv() and ZMQ_EVENT, reset trigger. This is how internals of zeromq work. > 2. ZMQ router does not need checking ZMQ_EVENT after zmq_send() for the read > trigger to work properly. Why? > I believe every socket needs that. The reason it works for you is just because it happens to be no messages to be received when you do zmq_send(). For instance, this is a case when you send single request at a time (requester sends a request, then sends next only when reply from previous received). -- Paul _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
