mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Backport evhttp_connection_get_bufferevent to Libevent 2.0
Backport by Arno Bakker; original implementation in 8d3a8500f4
This commit is contained in:
parent
7bbf6ca771
commit
da70fa705b
6
http.c
6
http.c
@ -2117,6 +2117,12 @@ evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase,
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct bufferevent *
|
||||||
|
evhttp_connection_get_bufferevent(struct evhttp_connection *evcon)
|
||||||
|
{
|
||||||
|
return evcon->bufev;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evhttp_connection_set_base(struct evhttp_connection *evcon,
|
evhttp_connection_set_base(struct evhttp_connection *evcon,
|
||||||
struct event_base *base)
|
struct event_base *base)
|
||||||
|
@ -428,6 +428,12 @@ struct evhttp_connection *evhttp_connection_base_new(
|
|||||||
struct event_base *base, struct evdns_base *dnsbase,
|
struct event_base *base, struct evdns_base *dnsbase,
|
||||||
const char *address, unsigned short port);
|
const char *address, unsigned short port);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the bufferevent that an evhttp_connection is using.
|
||||||
|
*/
|
||||||
|
struct bufferevent *evhttp_connection_get_bufferevent(
|
||||||
|
struct evhttp_connection *evcon);
|
||||||
|
|
||||||
/** Takes ownership of the request object
|
/** Takes ownership of the request object
|
||||||
*
|
*
|
||||||
* Can be used in a request callback to keep onto the request until
|
* Can be used in a request callback to keep onto the request until
|
||||||
|
Loading…
x
Reference in New Issue
Block a user