diff options
Diffstat (limited to 'src/io.h')
-rw-r--r-- | src/io.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,7 +1,17 @@ | |||
1 | #ifndef IO_H | 1 | #ifndef IO_H |
2 | #define IO_H | 2 | #define IO_H |
3 | 3 | ||
4 | #include "error.h" | 4 | #include <stdio.h> |
5 | |||
6 | /* IO error codes */ | ||
7 | enum { | ||
8 | IO_DONE, /* operation completed successfully */ | ||
9 | IO_TIMEOUT, /* operation timed out */ | ||
10 | IO_CLOSED, /* the connection has been closed */ | ||
11 | IO_ERROR, /* something wrong... */ | ||
12 | IO_REFUSED, /* transfer has been refused */ | ||
13 | IO_LIMITED /* maximum number of bytes reached */ | ||
14 | }; | ||
5 | 15 | ||
6 | /* interface to send function */ | 16 | /* interface to send function */ |
7 | typedef int (*p_send) ( | 17 | typedef int (*p_send) ( |