File: io.h

package info (click to toggle)
sacc 1.07-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: ansic: 2,156; makefile: 85
file content (23 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <netdb.h>

#define CONN_VALID 0
#define CONN_ERROR -1
#define CONN_RETRY -2
#define CONN_ABORT -3

struct cnx {
#ifdef USE_TLS
	struct tls *tls;
#endif
	int sock;
};

extern int tls;

extern int (*iosetup)(void);
extern int (*ioclose)(struct cnx *);
extern int (*ioconnect)(struct cnx *, struct addrinfo *, const char *);
extern void (*ioconnerr)(struct cnx *, const char *, const char *, int);
extern char *(*ioparseurl)(char *);
extern ssize_t (*ioread)(struct cnx *, void *, size_t);
extern ssize_t (*iowrite)(struct cnx *, void *, size_t);