curl-library
Re: libssh2 patch 10/15
Date: Mon, 20 Nov 2006 01:02:54 +0100 (CET)
On Sun, 19 Nov 2006, James Housley wrote:
>> * Blocking: the SFTP directory reading function is blocking and thus will
>> hang libcurl until the directory has completed. This should be fixed by
>> switching the reading into a state-machine.
>
> I had tried that initially and it failed to call back again. What do I need
> to do to make that work? A simple example or return value.
During download, Curl_read() will be called when there is data to read from
the socket, and that calls Curl_sftp_recv() which then should call the
necessary function(s) until it would block.
The big problem here is that libssh2 is not being a nice lib (yet) so it can't
return EWOULDBLOCK (or similar) and thus we won't know when we must return!
This TODO item probably must remain like this until we fix libssh2 in this
aspect. It is on my agenda.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-11-20