X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=lib%2Fmtio.h;fp=lib%2Fmtio.h;h=ffb57da0c253587166faa8c647ca4059015604e2;hp=2ea0eb557c8340566619ae8180376c9502397fa1;hb=bcad6b0c48d516ddc920b52f06083ceaa242e1ca;hpb=589987f8218c9aa61d65f582a3b3e1bbd32bda81 diff --git a/lib/mtio.h b/lib/mtio.h index 2ea0eb5..ffb57da 100644 --- a/lib/mtio.h +++ b/lib/mtio.h @@ -6,9 +6,23 @@ #define EV_READ 1 #define EV_WRITE 2 +struct stdiofd { + int fd; + int sock; + int timeout; + int rights, sendrights; +}; + +struct selected { + int fd, ev; +}; + +struct selected mblock(time_t to, int n, struct selected *spec); int block(int fd, int ev, time_t to); int ioloop(void); void exitioloop(int status); -FILE *mtstdopen(int fd, int issock, int timeout, char *mode); +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