On Thu, Jan 26, 2012 at 4:15 PM, Martin Sustrik <[email protected]> wrote:
> On 26/01/12 00:34, Yi Ding wrote: > > > Basically right now we have to call zmq_recv repeatedly until we get a > > EAGAIN, otherwise the edge-triggered file descriptor won't reset. The > > problem is that calling zmq_recv on a rep or req socket can also return > > a EFSM, which will trigger an exception in the C++ interface, which we > > then have to catch and handle. > > You can only get EFSM on REQ socket if you are trying to get a reply but > haven't sent a request first. That looks more like an application error > and deserves an at least an exception, but even an assert() could be > appropriate. > > Martin > > This could very well be my fault, but everything people have said on the mailing list is that to "reset" the edge-trigger, we must repeatedly call receive until we get a EAGAIN. However, in certain cases, after receiving a message, and calling receive again, instead of a EAGAIN, we get EFSM. What's the correct behavior here then? Cheers, Yi
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
