[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] get next timeout from libevent



Hi,
we are trying to build a library which uses libevent but also has the capability
to be integrated into an application's main loop.

Our solution so far includes three functions:
- get the list of file descriptions handled by our library
  (IOW the list of fds in libevent)
- register a callback to be called whenever a new fd is added
- perform a step (i.e. basically call libevent loop once)

This way the application can poll/select on our lib fds and then make a step
whenever necessary.

So far so good (please correct me if there's something missing :)).

At this point though the application won't be able to get the timeout for the
next event because AFAICS libevent's timeout_next() isn't supposed to be called
from the outside, is this correct?

Also, what would be the correct approach to build a library upon libevent which
can be then integrated into another main loop?

thanks in advance,
filippo
-- 
Filippo Giunchedi - http://esaurito.net - 0x6B79D401

A mathematician is a device for turning coffee into theorems.
-- Paul Erdos
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.