On Fri, Jan 28, 2011 at 11:26 PM, ZHOU Xiaobo <[email protected]> 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?
Yes; that's reported as a read event, so you get an error when you read. It's not the neatest interface in the universe, but most of the OS-provided event backends don't give you a lot of granularity in how they report errors, so Libevent needs to provide the common subset of their interfaces. yrs, -- Nick *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
