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.
/** 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
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)
{