Daniel Stenberg wrote:
> Or do we already say 0 means EOF?
The documentation on the website states that libssh2_sftp_read() is modelled
on the POSIX read(2) function, which has always returned 0 to indicate EOF.
My own code has always assumed this to be the case, which is why when I
suddenly started getting zero returns when not EOF I was puzzled and assumed
it to be a bug. If we had some other way to determine EOF for SFTP then I
might accept that returning zero might not always mean EOF but there's no
obvious function for determining EOF using any other means than returning
zero out of libssh2_sftp_read() - I'm assuming that libssh2_channel_eof()
cannot be used in this case.
If this is as active a discussion as it seems, perhaps it could be more
effectively explored using IRC?
-- Mark _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2012-02-09