diff options
author | Niels Provos <provos@gmail.com> | 2006-11-22 05:03:02 +0000 |
---|---|---|
committer | Niels Provos <provos@gmail.com> | 2006-11-22 05:03:02 +0000 |
commit | ce436242ad05172d2abe53ed83ab46f956edc789 (patch) | |
tree | b70cbfeec14f1f7303453276f7056b327880876b /http-internal.h | |
parent | 51fde16666a3402959cab77cd0313c9ff4b4c66a (diff) | |
download | libevent-ce436242ad05172d2abe53ed83ab46f956edc789.tar.gz |
an attempt at differentiated error handling for timeouts and eof.
really this needs to be propagated all the way to the callback.
svn:r273
Diffstat (limited to 'http-internal.h')
-rw-r--r-- | http-internal.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/http-internal.h b/http-internal.h index f6467f0e..b8ef6639 100644 --- a/http-internal.h +++ b/http-internal.h @@ -17,6 +17,12 @@ #define HTTP_PREFIX "http://" #define HTTP_DEFAULTPORT 80 +enum evhttp_connection_error { + EVCON_HTTP_TIMEOUT, + EVCON_HTTP_EOF, + EVCON_HTTP_INVALID_HEADER +}; + struct evbuffer; struct addrinfo; struct evhttp_request; @@ -85,7 +91,8 @@ void evhttp_connection_reset(struct evhttp_connection *); 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_connection_fail(struct evhttp_connection *, + enum evhttp_connection_error error); void evhttp_get_request(struct evhttp *, int, struct sockaddr *, socklen_t); |