Commit Graph

14 Commits

Author SHA1 Message Date
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
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
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
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
7d57222912 Finish making SFTP fully non-blocking capable.
Functions that return an "int", and friends, return LIBSSH2SFTP_EAGAIN.
Functions that return a structure return NULL and set the error to
LIBSSH2_ERROR_EAGAIN
2007-06-07 16:01:12 +00:00
James Housley
d141ba49f3 Make libssh2_sftp_write() be fully non-blocking. The state of the socket
is fully honored.  LIBSSH2SFTP_EAGAIN is returned when the call would
block.
2007-06-06 19:52:11 +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
James Housley
08fd7e259b Move sftp_nonblock.c to sftp_RW_nonblock.c, since it isn't just a
non-blocking version of sftp.c.  It has different command line parameters
and tries to do more
2007-04-22 14:15:47 +00:00