[zeromq-dev] Libev integration problem: Stop receiving ZMQ_EVENTS events

CheYi Lin cheyi.lin at gmail.com
Mon Dec 10 09:39:22 CET 2012


I'm using the low level API "zmq.h" in C, integrating zmq with libev event-loop.
My program is complicated but the zmq & libev integration part is
simple. (http://pastebin.com/6JiSh46N)

Sorry I'm new to the community.
Best Regards,
Cheyi Lin


On Mon, Dec 10, 2012 at 4:13 PM, Pieter Hintjens <pieterh at gmail.com> wrote:
> Can you make a raw test case (ideally in c using the low level API or czmq)?
>
> On Dec 10, 2012 8:37 AM, "CheYi Lin" <cheyi.lin at gmail.com> wrote:
>>
>> Hi,
>>
>> I'm doing some zmq ROUTER-to-ROUTER experiments in my distributed
>> system prototype.
>> (single threaded, libev event loop based application)
>>
>> Below is my test steps:
>>
>> 1. ROUTER A and B start, set unique identity, bind the address.
>>
>> (handshake)
>> 2. A connect to B.
>> 3. A send HELLO to B continuously.
>> 4. B recv HELLO then send HELLO_ACK back to A.
>> 5. A recv HELLO_ACK and stop sending HELLO, handshake finished.
>>
>> (start communication)
>> 6. A and B send HEARTBEAT to each other every 0.5 seconds.
>> 7. When HEARTBEAT received, A and B print "recv HEARTBEAT".
>>
>> After about 30 seconds, A stop printing "recv HEARTBEAT" but B
>> continue printing "recv HEARTBEAT".
>> And few seconds later I terminate B, suddenly A print lots of "recv
>> HEARTBEAT".
>>
>> I notice that A stop being signaled from the ZMQ_FD (in gdb), so all
>> HEARTBEAT from B was queued
>> after A stop printing "recv HEARTBEAT".
>>
>> My zmq-event handler:
>> http://pastebin.com/6JiSh46N
>>
>> Don't know why the handler stop receiving ZMQ_EVENTS events.
>> Could someone please review my code and give me some suggestions?
>>
>> Sorry for my bad english.
>>
>>
>> Regards,
>> Cheyi
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list