[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] Q: Exception callbacks and events that should run immediately
Hello libevent-users!
I am new to libevent, so sorry if these are FAQ questions (btw I haven't found any libevent FAQ).
I want to try integrating libevent in an existing project and there are a couple of things that are not clear from the documentation and from googling around.
1) I don't see any notion of event notification on FD exception - e.g. socket close.
There are some words for buffer events, but nothing for regular file
descriptor based callbacks. So what is a good way to get a callback when specific
FD is closed/disconnected?
2) Sometimes I need to post an event that will be executed in the same event loop iteration
(possibly after other events are processed)- e.g. I want to break a long call stack and restart
from the event loop or want to give other events a chance to run. What is the good way of doing this -
should I just post a timer event with a zero timeout value or do something else?
Regards,
- Alex***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.