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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 /* we use tailq only if they were created for an http server */ | 54 /* we use tailq only if they were created for an http server */ |
55 TAILQ_ENTRY(evhttp_connection) (next); | 55 TAILQ_ENTRY(evhttp_connection) (next); |
56 | 56 |
57 int fd; | 57 int fd; |
58 struct event ev; | 58 struct event ev; |
59 struct event close_ev; | 59 struct event close_ev; |
60 struct evbuffer *input_buffer; | 60 struct evbuffer *input_buffer; |
61 struct evbuffer *output_buffer; | 61 struct evbuffer *output_buffer; |
62 | 62 |
63 char *bind_address; /* address to use for binding the src */ | 63 char *bind_address; /* address to use for binding the src */ |
| 64 u_short bind_port; /* local port for binding the src */ |
64 | 65 |
65 char *address; /* address to connect to */ | 66 char *address; /* address to connect to */ |
66 u_short port; | 67 u_short port; |
67 | 68 |
68 int flags; | 69 int flags; |
69 #define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */ | 70 #define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */ |
70 #define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */ | 71 #define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */ |
71 #define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */ | 72 #define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */ |
72 | 73 |
73 int timeout; /* timeout in seconds for events */ | 74 int timeout; /* timeout in seconds for events */ |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *); | 145 void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *); |
145 | 146 |
146 void evhttp_write_buffer(struct evhttp_connection *, | 147 void evhttp_write_buffer(struct evhttp_connection *, |
147 void (*)(struct evhttp_connection *, void *), void *); | 148 void (*)(struct evhttp_connection *, void *), void *); |
148 | 149 |
149 /* response sending HTML the data in the buffer */ | 150 /* response sending HTML the data in the buffer */ |
150 void evhttp_response_code(struct evhttp_request *, int, const char *); | 151 void evhttp_response_code(struct evhttp_request *, int, const char *); |
151 void evhttp_send_page(struct evhttp_request *, struct evbuffer *); | 152 void evhttp_send_page(struct evhttp_request *, struct evbuffer *); |
152 | 153 |
153 #endif /* _HTTP_H */ | 154 #endif /* _HTTP_H */ |
OLD | NEW |