ioloop.h revision 007d354a674fb3ddf49db160cf050cf61270a1a0
da2aa032ccfa8e7e4a4380ef738014549f4d2c2dTimo Sirainentypedef void timeout_callback_t(void *context);
7e1f68ad71d3485f1882142837b01f7a98ca8467Timo Sirainen/* Time when the I/O loop started calling handlers.
7e1f68ad71d3485f1882142837b01f7a98ca8467Timo Sirainen Can be used instead of time(NULL). */
5ac0b0bf32898c63da086ae169674ecac151a31eTimo Sirainen/* I/O listeners - you can create different handlers for IO_READ and IO_WRITE,
5ac0b0bf32898c63da086ae169674ecac151a31eTimo Sirainen but make sure you don't create multiple handlers of same type, it's not
2526d52441ef368215ab6bf04fd0356d3b09d235Timo Sirainen checked and removing one will stop the other from working as well. */
2526d52441ef368215ab6bf04fd0356d3b09d235Timo Sirainenstruct io *io_add(int fd, int condition, io_callback_t *callback, void *context);
09801f106cd531a28b4e03ec665e44c421264560Timo Sirainen/* Timeout handlers */
fe363b433b8038a69b55169da9dca27892ad7d18Timo Sirainenstruct timeout *timeout_add(unsigned int msecs, timeout_callback_t *callback,
bdcb00145ad87765e3fd22d4ebc4d2c029a326b9Timo Sirainenvoid io_loop_stop(struct ioloop *ioloop); /* safe to run in signal handler */
8cb72c59d5ea4e9e5f638d7ec840bb853f5a188eTimo Sirainen/* call these if you wish to run the iteration only once */
8cb72c59d5ea4e9e5f638d7ec840bb853f5a188eTimo Sirainenvoid io_loop_set_running(struct ioloop *ioloop);