1
1

18 Коммитов

Автор SHA1 Сообщение Дата
Guenter Knauf
1f8d58a4ce added sys/select.h include to samples for fd_set on NetWare. 2009-09-06 06:15:29 +02:00
Daniel Stenberg
1ffa2cb519 These examples no longer need to explictly set the socket to non-blocking state
as libssh2 itself will always do that by itself.
2009-05-26 09:41:13 +02:00
Daniel Stenberg
6409bb53ba remove pointless sleeps 2009-04-28 10:35:30 +00:00
Daniel Stenberg
239bdffb59 avoid some busy-looping 2009-03-25 22:52:32 +00:00
Daniel Stenberg
bdd005a5e5 fixed to work quite similar to the sftp_nonblock example so that it waits
for the socket correctly and measures the transfer speed fine
2009-03-14 09:40:57 +00:00
Daniel Stenberg
5438cffd9a Richard W.M. Jones' 5 patches that enables libssh2 to get cross-compiled with
mingw
2008-11-10 16:48:41 +00:00
Daniel Stenberg
d26a330483 Carlo Bramini's fixes for the nonblocking examples for msys/mingw 2008-09-30 08:55:35 +00:00
Daniel Stenberg
46f26d3d0e oops, that was debugging code that wasn't supposed to be committed! 2007-09-24 12:15:45 +00:00
Daniel Stenberg
5d91d286f1 fix by Immanuel Gregoire, sizeof != strlen! 2007-09-24 12:14:18 +00:00
Dan Fandrich
c4630d1ffb Removed unnecessary casts and added const where necessary. 2007-08-09 01:10:11 +00:00
Daniel Stenberg
68c86e2c4c The examples no longer have an include path pointing to the private source dir
but instead uses its own config.h file, that now is included first to make
large file magic have an effect.
2007-07-31 11:00:29 +00:00
Daniel Stenberg
accd865aff converted to 4-level space indents, no trailing whitespace 2007-07-14 21:24:38 +00:00
James Housley
6ac790a477 * Since the packet as already had data read from it, it can't retrun
PACKET_EAGAIN while reading the rest of it.
* Get the error message in libssh2_scp_recv() in the same manner as it
  was gotten in libssh2_scp_send_ex()
2007-07-05 15:31:19 +00:00
James Housley
cf8f4d1818 To simplify the user's error interface always use LIBSSH2_ERROR_EAGAIN.
LIBSSH2CHANNEL_EAGAIN and LIBSSH2SFTP_EAGAIN are still valid, but are
defined as LIBSSH2_ERROR_EAGAIN.
2007-06-08 13:33:08 +00:00
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
Guenter Knauf
145bbabb96 include libssh_config.h to get the configure vars in. 2007-04-26 23:59:14 +00:00
Guenter Knauf
40970adb53 changed to configure defines to control inclusion of headers from libssh2_config.h. 2007-04-26 22:59:29 +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