On Mon, Jul 4, 2011 at 4:31 PM, Aaron Boxer <[email protected]> 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. Ambrus _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
