Avoid recursion when processing residual inbuf data.
[shim.git] / conn.h
blobb30f344ac1513a2bf419e2a43e16ce4737e3ffd9
1 #ifndef _CONN_H_
2 #define _CONN_H_
4 enum socks_ver {
5 SOCKS_NONE,
6 SOCKS_4,
7 SOCKS_4a
8 };
10 /* called on connect completion with the bev, conn status (0 failed, 1 ok). */
12 struct bufferevent;
14 typedef void (*conn_connectcb)(struct bufferevent *bev, int ok, void *arg);
16 int conn_connect_bufferevent(struct bufferevent *bev, struct evdns_base *dns,
17 int family, const char *name, int port,
18 conn_connectcb conncb, void *arg);
19 int conn_set_socks_server(const char *name, int port, enum socks_ver ver);
20 const char *conn_get_connect_error(void);
22 #endif