X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Fmtio.h;h=f6611df480a478f5f19b55a09300882445f4c404;hb=b97cd36bf60b82b008aadd8cddb8e8ce8fe3602a;hp=874eec69fe01509551c8ecccb0382af691b979b5;hpb=8774c31b4795b6cd61aeddefe8bbd1d2551d84ca;p=ashd.git diff --git a/lib/mtio.h b/lib/mtio.h index 874eec6..f6611df 100644 --- a/lib/mtio.h +++ b/lib/mtio.h @@ -6,8 +6,17 @@ #define EV_READ 1 #define EV_WRITE 2 +struct stdiofd { + int fd; + int sock; + int timeout; +}; + int block(int fd, int ev, time_t to); -void ioloop(void); -FILE *mtstdopen(int fd, int issock, int timeout, char *mode); +int ioloop(void); +void exitioloop(int status); +FILE *mtstdopen(int fd, int issock, int timeout, char *mode, struct stdiofd **infop); +struct bufio *mtbioopen(int fd, int issock, int timeout, char *mode, struct stdiofd **infop); +void mtiopipe(FILE **read, FILE **write); #endif