ioloop.h revision 66251e6ab31e5cc153fe5cae608e416dacafe9cd
#ifndef __IOLOOP_H
#define __IOLOOP_H
#include <time.h>
#define IO_READ (1 << 0)
#define IO_PRIORITY_LOW 100
#define IO_PRIORITY_DEFAULT 0
#define IO_PRIORITY_HIGH -100
/* Time when the I/O loop started calling handlers.
Can be used instead of time(NULL). */
extern time_t ioloop_time;
extern struct timeval ioloop_timeval;
/* I/O listeners - you can create different handlers for IO_READ and IO_WRITE,
but make sure you don't create multiple handlers of same type, it's not
checked and removing one will stop the other from working as well. */
/* Timeout handlers */
/* call these if you wish to run the iteration only once */
IOLoop io_loop_create(void);
#endif