io.h - sacc - sacc(omys), simple console gopher client | |
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
io.h (553B) | |
--- | |
1 #include <netdb.h> | |
2 | |
3 #define CONN_VALID 0 | |
4 #define CONN_ERROR -1 | |
5 #define CONN_RETRY -2 | |
6 #define CONN_ABORT -3 | |
7 | |
8 struct cnx { | |
9 #ifdef USE_TLS | |
10 struct tls *tls; | |
11 #endif | |
12 int sock; | |
13 }; | |
14 | |
15 extern int tls; | |
16 | |
17 extern int (*iosetup)(void); | |
18 extern int (*ioclose)(struct cnx *); | |
19 extern int (*ioconnect)(struct cnx *, struct addrinfo *, const char *); | |
20 extern void (*ioconnerr)(struct cnx *, const char *, const char *, int); | |
21 extern char *(*ioparseurl)(char *); | |
22 extern ssize_t (*ioread)(struct cnx *, void *, size_t); | |
23 extern ssize_t (*iowrite)(struct cnx *, void *, size_t); |