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