13 #define HTTP_CONNECT_TIMEOUT 45
14 #define HTTP_WRITE_TIMEOUT 50
15 #define HTTP_READ_TIMEOUT 50
17 #define HTTP_PREFIX "http://"
18 #define HTTP_DEFAULTPORT 80
20 enum message_read_status {
22 MORE_DATA_EXPECTED = 0,
27 enum evhttp_connection_error {
30 EVCON_HTTP_INVALID_HEADER
39 enum evhttp_connection_state {
43 EVCON_READING_FIRSTLINE,
45 EVCON_READING_HEADERS,
47 EVCON_READING_TRAILER,
59 struct event close_ev;
70 #define EVHTTP_CON_INCOMING 0x0001
71 #define EVHTTP_CON_OUTGOING 0x0002
72 #define EVHTTP_CON_CLOSEDETECT 0x0004
78 enum evhttp_connection_state state;
81 struct evhttp *http_server;
110 struct event bind_ev;
116 TAILQ_HEAD(httpcbq,
evhttp_cb) callbacks;
117 struct evconq connections;
135 enum evhttp_connection_error error);
137 void evhttp_get_request(
struct evhttp *,
int,
struct sockaddr *, socklen_t);
139 int evhttp_hostportfile(
char *,
char **, u_short *,
char **);
151 void evhttp_response_code(
struct evhttp_request *,
int,
const char *);