ioloop.h revision 3185a94a1253e1f513e056a49085a9baa5ffabc9
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Boschtypedef void timeout_callback_t(void *context);
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch/* Time when the I/O loop started calling handlers.
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch Can be used instead of time(NULL). */
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch/* I/O listeners - you can create different handlers for IO_READ and IO_WRITE,
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch but make sure you don't create multiple handlers of same type, it's not
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch checked and removing one will stop the other from working as well. */
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Boschstruct io *io_add(int fd, int condition, io_callback_t *callback, void *context);
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Boschstruct io *io_add_priority(int fd, int priority, int condition,
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch/* Timeout handlers */
659f431cb56f26ec07e308db4d6c563c0eaa5300Stephan Boschstruct timeout *timeout_add(int msecs, timeout_callback_t *callback,
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Boschvoid io_loop_stop(struct ioloop *ioloop); /* safe to run in signal handler */
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch/* call these if you wish to run the iteration only once */
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Boschvoid io_loop_set_running(struct ioloop *ioloop);