Hi Gerhard,

On Mon, Apr 23, 2012 at 3:53 PM, Gerhard Lipp <gel...@googlemail.com> wrote:
> Hello,
>
> I can observe the same behavior as stated here
> (http://lists.zeromq.org/pipermail/zeromq-dev/2011-November/014615.html).
> What I observe is also a XREP/XREQ (ROUTER/DEALER) prob, where the
> XREQ is waiting forever to receive a message (which has been
> definitely sent). When I poll (timer based) the ZMQ_EVENTs, the XREQ
> is readable as expected. I am using libev (select based) for doing IO
> and I am aware of the edge-based trigger behaviour (I am
> reading/forwarding messages until ZMQ_EVENTs does not include the
> ZMQ_POLLIN bit any more).
>
> What is the status of this issue?
> Unfortunately my setup is a bit complicated to share, but i would like
> to help as much as possible.
>

We are using zeromq with libev without any issues. The only non-obvious
thing is that even if you doing send to a socket, you need to check whether
it became readable (and vice versa). You can look at the code at:

    https://github.com/tailhook/zerogw/blob/master/src/http.c:300

It looks like:

    // Must wake up reading and on each send, because the way zmq sockets work
    ev_feed_event(root.loop, &route->zmq_forward.socket._watch, EV_READ);

For simplicity we are just feeding libev event when doing send, so it's
checked for reading at the next loop iteration (And we never block for
writing, if you care)

-- 
Paul
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to