I have an event that gets created with EV_READ | EV_PERSIST, and I'm considering different ways to implement read timeouts. Passing a timeout value to event_add() is the obvious approach, but the docs don't make it clear what behavior to expect...
"The event in the ev argument must be already initialized by event_set() and may not be used in calls to event_set() until it has timed out or been removed with event_del(). If the event in the ev argument already has a scheduled timeout, the old timeout will be replaced by the new one." If my callback receives EV_TIMEOUT in its second argument, does that mean my read event has been canceled despite my use of EV_PERSIST? If so, does that mean libevent's timeout code has already called event_del() behind the scenes? (In other words, do I still have to call event_del()?) If an EV_PERSIST event callback receives EV_TIMEOUT, can it reinstate its persistent read event just by calling event_add()? Can someone update the docs to clarify how EV_PERSIST and EV_TIMEOUT interact? In case it matters, I'm using libevent 1.3b on linux. Cheers, Forest _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users