mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Accessor function to get a listener's associated fd
svn:r1390
This commit is contained in:
parent
625116295a
commit
75fe762e03
@ -4,7 +4,7 @@ Changes in 2.0.3-alpha:
|
||||
o Avoid segfault during failed allocation of locked evdns_base. (Found by Rocco Carbone.)
|
||||
o Export new evutil_ascii_* functions to perform locale-independent character type operations.
|
||||
o Try to compile better with MSVC: patches from Brodie Thiesfield
|
||||
|
||||
o New evconnlistener_get_fd function to expose a listener's associated socket.
|
||||
|
||||
Changes in 2.0.2-alpha:
|
||||
o Add a new flag to bufferevents to make all callbacks automatically deferred.
|
||||
|
@ -105,4 +105,7 @@ int evconnlistener_disable(struct evconnlistener *lev);
|
||||
/** Return an evconnlistener's associated event_base. */
|
||||
struct event_base *evconnlistener_get_base(struct evconnlistener *lev);
|
||||
|
||||
/** Return the socket that an evconnlistner is listening on. */
|
||||
evutil_socket_t evconnlistener_get_fd(struct evconnlistener *lev);
|
||||
|
||||
#endif
|
||||
|
@ -153,6 +153,12 @@ evconnlistener_get_base(struct evconnlistener *lev)
|
||||
return event_get_base(&lev->listener);
|
||||
}
|
||||
|
||||
evutil_socket_t
|
||||
evconnlistener_get_fd(struct evconnlistener *lev)
|
||||
{
|
||||
return event_get_fd(&lev->listener);
|
||||
}
|
||||
|
||||
static void
|
||||
listener_read_cb(evutil_socket_t fd, short what, void *p)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user