If it is a disconnection event resulted from FIN or RESET, you could detect
that
by read() or recv(), not by select/poll. So, disconnect belongs to EV_READ and
its not an error.
Yufei
From: ZHOU Xiaobo
To: libevent-us...@freehaven.net
Sent: Fri, January 28,
On Fri, Jan 28, 2011 at 11:26 PM, ZHOU Xiaobo wrote:
> I mean the error 'epoll'(or sth else) detected.
> for example, if a socket is closed by its peer, and the corresponding
> callback is invoked, how can the callback know
> that there is and error happened? try to read/write the socket first?