iolooper.h revision 5d8f37ad78fc66901af50c762029a501561f3b23
1#ifndef IOLOOPER_H 2#define IOLOOPER_H 3 4#include <stdint.h> 5 6/* An IOLooper is an abstraction for select() */ 7 8typedef struct IoLooper IoLooper; 9 10IoLooper* iolooper_new(void); 11void iolooper_free( IoLooper* iol ); 12void iolooper_reset( IoLooper* iol ); 13 14void iolooper_add_read( IoLooper* iol, int fd ); 15void iolooper_add_write( IoLooper* iol, int fd ); 16void iolooper_del_read( IoLooper* iol, int fd ); 17void iolooper_del_write( IoLooper* iol, int fd ); 18 19int iolooper_poll( IoLooper* iol ); 20int iolooper_wait( IoLooper* iol, int64_t duration ); 21 22int iolooper_is_read( IoLooper* iol, int fd ); 23int iolooper_is_write( IoLooper* iol, int fd ); 24 25#endif /* IOLOOPER_H */ 26