OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2001 Niels Provos <provos@citi.umich.edu> | 2 * Copyright 2001 Niels Provos <provos@citi.umich.edu> |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This header file contains definitions for dealing with HTTP requests | 5 * This header file contains definitions for dealing with HTTP requests |
6 * that are internal to libevent. As user of the library, you should not | 6 * that are internal to libevent. As user of the library, you should not |
7 * need to know about these. | 7 * need to know about these. |
8 */ | 8 */ |
9 | 9 |
10 #ifndef _HTTP_H_ | 10 #ifndef _HTTP_H_ |
(...skipping 13 matching lines...) Expand all Loading... |
24 REQUEST_CANCELED = -2 | 24 REQUEST_CANCELED = -2 |
25 }; | 25 }; |
26 | 26 |
27 enum evhttp_connection_error { | 27 enum evhttp_connection_error { |
28 EVCON_HTTP_TIMEOUT, | 28 EVCON_HTTP_TIMEOUT, |
29 EVCON_HTTP_EOF, | 29 EVCON_HTTP_EOF, |
30 EVCON_HTTP_INVALID_HEADER | 30 EVCON_HTTP_INVALID_HEADER |
31 }; | 31 }; |
32 | 32 |
33 struct evbuffer; | 33 struct evbuffer; |
34 struct addrinfo; | |
35 struct evhttp_request; | 34 struct evhttp_request; |
36 | 35 |
37 /* A stupid connection object - maybe make this a bufferevent later */ | 36 /* A stupid connection object - maybe make this a bufferevent later */ |
38 | 37 |
39 enum evhttp_connection_state { | 38 enum evhttp_connection_state { |
40 EVCON_DISCONNECTED, /**< not currently connected not trying either*/ | 39 EVCON_DISCONNECTED, /**< not currently connected not trying either*/ |
41 EVCON_CONNECTING, /**< tries to currently connect */ | 40 EVCON_CONNECTING, /**< tries to currently connect */ |
42 EVCON_IDLE, /**< connection is established */ | 41 EVCON_IDLE, /**< connection is established */ |
43 EVCON_READING_FIRSTLINE,/**< reading Request-Line (incoming conn) or | 42 EVCON_READING_FIRSTLINE,/**< reading Request-Line (incoming conn) or |
44 **< Status-Line (outgoing conn) */ | 43 **< Status-Line (outgoing conn) */ |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *); | 144 void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *); |
146 | 145 |
147 void evhttp_write_buffer(struct evhttp_connection *, | 146 void evhttp_write_buffer(struct evhttp_connection *, |
148 void (*)(struct evhttp_connection *, void *), void *); | 147 void (*)(struct evhttp_connection *, void *), void *); |
149 | 148 |
150 /* response sending HTML the data in the buffer */ | 149 /* response sending HTML the data in the buffer */ |
151 void evhttp_response_code(struct evhttp_request *, int, const char *); | 150 void evhttp_response_code(struct evhttp_request *, int, const char *); |
152 void evhttp_send_page(struct evhttp_request *, struct evbuffer *); | 151 void evhttp_send_page(struct evhttp_request *, struct evbuffer *); |
153 | 152 |
154 #endif /* _HTTP_H */ | 153 #endif /* _HTTP_H */ |
OLD | NEW |