[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Q: Will listener FD receive regular EV_READ callbacks?



On Wed, Dec 05, 2012 at 10:52:37PM +0000, Alexander Kolbasov wrote:
> The libevent documentation mentions connection listeners that provide callback events for listener file descriptors. 
> My question is - if we register EV_READ callback on a listener file descriptor, will it get EV_READ events when a
> new connection is arriving or the only way to work with listenets is via evconnlistener interface?
> 

evconnlistener_new_bind, second argument is your accept callback. If
there is an error on the socket after bufferevent_socket(), you set the
4th argument, the eventcb, and that is where the errors are passed.

If you are connecting to something, the eventcb is where your on
connected and errors happen.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.