From: Maxime Henrion Date: Wed, 24 Jul 2013 20:50:05 +0000 (+0000) Subject: Add evhttp_connection_get_server(). X-Git-Tag: release-2.1.4-alpha~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7f82a314f8848aca82edf6d1a310f444fb99956;p=libevent Add evhttp_connection_get_server(). --- diff --git a/http.c b/http.c index 2dc8206f..55190e26 100644 --- a/http.c +++ b/http.c @@ -2253,6 +2253,12 @@ struct bufferevent* evhttp_connection_get_bufferevent(struct evhttp_connection * return evcon->bufev; } +struct evhttp * +evhttp_connection_get_server(struct evhttp_connection *evcon) +{ + return evcon->http_server; +} + struct evhttp_connection * evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase, const char *address, unsigned short port) diff --git a/include/event2/http.h b/include/event2/http.h index 0428ea9e..0db75ed4 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -452,6 +452,11 @@ struct evhttp_connection *evhttp_connection_base_bufferevent_new( */ struct bufferevent* evhttp_connection_get_bufferevent(struct evhttp_connection *evcon); +/** + * Return the HTTP server associated with this connection, or NULL. + */ +struct evhttp *evhttp_connection_get_server(struct evhttp_connection *evcon); + /** * Creates a new request object that needs to be filled in with the request * parameters. The callback is executed when the request completed or an