lib: Added mtio ability to pass file descriptors over streams.
[ashd.git] / lib / mtio.h
... / ...
CommitLineData
1#ifndef _LIB_MTIO_H
2#define _LIB_MTIO_H
3
4#include <stdio.h>
5
6#define EV_READ 1
7#define EV_WRITE 2
8
9struct stdiofd {
10 int fd;
11 int sock;
12 int timeout;
13 int rights, sendrights;
14};
15
16int block(int fd, int ev, time_t to);
17int ioloop(void);
18void exitioloop(int status);
19FILE *mtstdopen(int fd, int issock, int timeout, char *mode, struct stdiofd **infop);
20struct bufio *mtbioopen(int fd, int issock, int timeout, char *mode, struct stdiofd **infop);
21void mtiopipe(FILE **read, FILE **write);
22
23#endif