summaryrefslogtreecommitdiff
path: root/http-internal.h
diff options
context:
space:
mode:
authorNiels Provos <provos@gmail.com>2006-11-18 03:05:26 +0000
committerNiels Provos <provos@gmail.com>2006-11-18 03:05:26 +0000
commit36212f9df0664c3d9056d18d962ef37acf9a45e3 (patch)
treeca57153ecc88a34ffbfb7963d539fa998a26ab04 /http-internal.h
parentd2c27da1145e81267737e9a52dd9cf2fd45721f9 (diff)
downloadlibevent-36212f9df0664c3d9056d18d962ef37acf9a45e3.tar.gz
make persistent connections work; needs more testing
svn:r261
Diffstat (limited to 'http-internal.h')
-rw-r--r--http-internal.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/http-internal.h b/http-internal.h
index 5843b37c..17015e1e 100644
--- a/http-internal.h
+++ b/http-internal.h
@@ -30,6 +30,9 @@ enum evhttp_connection_state {
};
struct evhttp_connection {
+ /* we use tailq only if they were created for an http server */
+ TAILQ_ENTRY(evhttp_connection) next;
+
int fd;
struct event ev;
struct evbuffer *input_buffer;
@@ -44,6 +47,9 @@ struct evhttp_connection {
enum evhttp_connection_state state;
+ /* for server connections, the http server they are connected with */
+ struct evhttp *http_server;
+
TAILQ_HEAD(evcon_requestq, evhttp_request) requests;
void (*cb)(struct evhttp_connection *, void *);
@@ -63,6 +69,7 @@ struct evhttp {
struct event bind_ev;
TAILQ_HEAD(httpcbq, evhttp_cb) callbacks;
+ TAILQ_HEAD(evconq, evhttp_connection) connections;
void (*gencb)(struct evhttp_request *req, void *);
void *gencbarg;
@@ -77,8 +84,7 @@ int evhttp_connection_connect(struct evhttp_connection *);
/* notifies the current request that it failed; resets connection */
void evhttp_connection_fail(struct evhttp_connection *);
-void evhttp_get_request(int, struct sockaddr *, socklen_t,
- void (*)(struct evhttp_request *, void *), void *);
+void evhttp_get_request(struct evhttp *, int, struct sockaddr *, socklen_t);
int evhttp_hostportfile(char *, char **, u_short *, char **);