libev: multiple writes in write callback?

Zsbán Ambrus ambrus at
Mon Jul 4 21:03:41 CEST 2011

On Mon, Jul 4, 2011 at 4:31 PM, Aaron Boxer <boxerab at> wrote:
> Thanks, Ambrus!  I am reading from the socket using the
> ::read command. So, I guess I wouldn't get the EAGAIN error,
> just get a 0 return value. I suppose it would be better to use recv,
> because I could handle EAGAIN and return.

I don't think there's a difference between read and recv in this
respect: either of them returns 0 on an end of file (such as if the
peer has closed or shut down a connection in case of a tcp connection
socket); but EOF with errno=EAGAIN if there is nothing to read yet.


More information about the libev mailing list