On Thu, 9 Feb 2012, Peter Stuge wrote:
> I think it would be nice to return EAGAIN if we read 0 bytes from transport.
I don't. EAGAIN is only ever introduced in the transport layer when there's
actually an EAGAIN from the socket layer. Introducing it elsewhere has always
only introduced badness in the past and we've had to backpedal out from that
several times.
For example, EAGAIN implies that you need to call the same function again to
make it "finish" what was previously started while 0 means that it wasn't
abruptly stopped in the middle of something that needs to be continued but
that other functions may very well be used.
-- / daniel.haxx.se _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2012-02-09