sacc

sacc (saccomys): simple gopher client.
Log | Files | Refs | LICENSE

io.h (436B)


      1 #include <netdb.h>
      2 
      3 struct cnx {
      4 #ifdef USE_TLS
      5 	struct tls *tls;
      6 #endif
      7 	int sock;
      8 };
      9 
     10 extern int tls;
     11 
     12 extern int (*ioclose)(struct cnx *);
     13 extern int (*ioconnect)(struct cnx *, struct addrinfo *, const char *);
     14 extern void (*ioconnerr)(struct cnx *, const char *, const char *, int);
     15 extern char *(*ioparseurl)(char *);
     16 extern ssize_t (*ioread)(struct cnx *, void *, size_t);
     17 extern ssize_t (*iowrite)(struct cnx *, void *, size_t);