1
1

9 Коммитов

Автор SHA1 Сообщение Дата
James Housley
4b8db8c1ab Modify the code to truely support non-blocking. Propogate the EAGAIN error
all the way up to the user interface.  All code modules bug sftp.c have
been completed.

Functions that return an "int", or similar return LIBSSH2CHANNEL_EAGAIN to
indicate some part of the call would block, in non-blocking mode.

Functions that return a structure, like "LIBSSH2_CHANNEL *", return NULL
and set the libssh2 error.  The error can be obtained with either
libssh2_session_last_error() or libssh2_session_last_errno().  Either of
these will return the error code of LIBSSH2_ERROR_EAGAIN if the
call would block, in non-blocking mode.

The current state of a function and some variable are keep in the
structures so that on the next call the operation that would block can
be retried again with the same data.
2007-06-06 12:34:06 +00:00
Dan Fandrich
62f77b1e4b Fix building out of the source tree. 2007-05-01 20:07:08 +00:00
Guenter Knauf
145bbabb96 include libssh_config.h to get the configure vars in. 2007-04-26 23:59:14 +00:00
James Housley
046edb478f Test programs for libssh2_sftp_mkdir_ex() and libssh2_sftp_mkdirnb_ex() 2007-04-22 19:52:51 +00:00
James Housley
c43c390a7d Create two sample programs, similar to sftp.c and sftp_nonblock.c, that
will test blocking and non-blocking write SFTP transfers
2007-04-22 15:57:52 +00:00
James Housley
3bd3eb35b3 Make sftp_nonblock.c a non-blocking version of sftp.c, just like sftpdir.c 2007-04-22 14:16:26 +00:00
James Housley
f8fe38e3a5 Create a simple test for sftp readdir with non-blocking 2007-04-21 18:08:00 +00:00
Daniel Stenberg
689c394c57 Added sftpdir, a sample doing an SFTP directory listing 2007-02-23 11:18:41 +00:00
Daniel Stenberg
9d55db6501 Adding src/transport.c for the SECSH transport layer read/write in a non-
blocking way. The channel code is now responsible for enabling/disabling
blocking status and to work with it.

I've also modified indenting and fixed compiler warnings at places, and
added a bunch of new examples in example/simple that I've used to verify that
the code still runs like before.

libssh2_channel_{read|write}nb_ex() and libssh2_sftp_{read|write}nb() are the
four new functions that supposedly work non-blocking.
2007-02-02 16:21:20 +00:00