diff options
Diffstat (limited to 'third_party/libevent/evhttp.h')
-rw-r--r-- | third_party/libevent/evhttp.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/third_party/libevent/evhttp.h b/third_party/libevent/evhttp.h index 0d35f9e..99d16a2 100644 --- a/third_party/libevent/evhttp.h +++ b/third_party/libevent/evhttp.h @@ -267,6 +267,10 @@ void evhttp_connection_free(struct evhttp_connection *evcon); void evhttp_connection_set_local_address(struct evhttp_connection *evcon, const char *address); +/** sets the local port from which http connections are made */ +void evhttp_connection_set_local_port(struct evhttp_connection *evcon, + unsigned short port); + /** Sets the timeout for events related to this connection */ void evhttp_connection_set_timeout(struct evhttp_connection *evcon, int timeout_in_secs); @@ -331,10 +335,20 @@ char *evhttp_decode_uri(const char *uri); /** * Helper function to parse out arguments in a query. - * The arguments are separated by key and value. - * URI should already be decoded. + * + * Parsing a uri like + * + * http://foo.com/?q=test&s=some+thing + * + * will result in two entries in the key value queue. + + * The first entry is: key="q", value="test" + * The second entry is: key="s", value="some thing" + * + * @param uri the request URI + * @param headers the head of the evkeyval queue */ -void evhttp_parse_query(const char *uri, struct evkeyvalq *); +void evhttp_parse_query(const char *uri, struct evkeyvalq *headers); /** |