Daniel Stenberg
bf884488ae
slighty better behavior and comments
2009-05-26 11:18:00 +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
4490c6b434
use a better example file name for the known_hosts file
2009-05-07 20:30:22 +00:00
Daniel Stenberg
4b991b232d
My knownhost work as of right now. It works at least partly. More tests and
...
tweaks will come.
2009-05-07 13:09:48 +00:00
Daniel Stenberg
4bc1b8a1d7
get host, user, password and command from the command line
2009-05-05 12:30:19 +00:00
Daniel Stenberg
755e213ae6
Added ssh2_exec as a new example, showing how to run a command remotely with
...
libssh2
2009-05-05 12:27:02 +00:00
Daniel Stenberg
6409bb53ba
remove pointless sleeps
2009-04-28 10:35:30 +00:00
Daniel Stenberg
5a3da233ec
Sofian Brabez removed duplicate calls to libssh2_session_set_blocking()
2009-03-31 12:20:36 +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
d89782d99f
improved non-blocking behavior for some of the initing stuff before the actual
...
data transfer begins
2009-03-13 22:14:47 +00:00
Daniel Stenberg
2ba8db9168
wait for socket action accordingly, and do some measurements on the transfer
...
to make this better to use for speed tests
2009-03-13 12:35:13 +00:00
Simon Josefsson
1f015d72b1
Use AM_CPPFLAGS instead of deprecated INCLUDES.
2008-11-21 14:34:03 +00:00
Simon Josefsson
9d433d4f80
Add gcov files.
2008-11-21 08:23:54 +00:00
Simon Josefsson
86eaae7886
Add more.
2008-11-18 17:00:57 +00:00
Daniel Stenberg
8e8dc43b0c
fix the include path to also point out the build dir's src/ dir for the cases
...
where we build the lot outside of the source dir
2008-11-11 22:33:26 +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
Dan Fandrich
f8d4de78e9
Fixed the samples to build outside the source tree.
...
Removed redundant _SOURCES lines.
2007-08-09 00:42:05 +00:00
James Housley
0d78e69016
libssh2_userauth_list() requires the lenght of the username to be passed,
...
and not the sizeof() the array holding it.
2007-08-03 15:08:28 +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
Guenter Knauf
2b7856ad32
ooups - forgotten var added.
2007-07-22 02:15:31 +00:00
Guenter Knauf
9a1ce06e31
added keyboard-interactive auth method;
...
added 5. argument to specify auth method.
2007-07-22 02:07:55 +00:00
Guenter Knauf
2127c5967e
moved the inclusion of libssh2_config.h to the top.
2007-07-20 09:51:05 +00:00
Guenter Knauf
242475c42a
added keyboard-interactive auth method;
...
added 4. argument to specify auth method.
2007-07-20 01:23:10 +00:00
Guenter Knauf
854dffe0a4
moved blocks to make keyboard-interactive second choice (if implemented).
2007-07-19 17:08:54 +00:00
Guenter Knauf
278219fc0a
few cosmetic changes; added block for future implementation of keyboard-interactive method.
2007-07-19 15:43:48 +00:00
Guenter Knauf
16be3fc778
removed obsolete line.
2007-07-19 15:29:06 +00:00
Guenter Knauf
edcfab905a
added selection of authentication method based on what libssh2_userauth_list() returns; added vars for the key files.
2007-07-19 15:25:46 +00:00
Guenter Knauf
3fc4caf42f
fixed call to libssh2_userauth_list() since NULL isnt supported for the username.
2007-07-18 19:31:15 +00:00
Guenter Knauf
1a9fee074b
added check for available authentication methods.
2007-07-18 11:46:25 +00:00
Guenter Knauf
839be89a49
added test success messages.
2007-07-16 22:16:21 +00:00
Daniel Stenberg
accd865aff
converted to 4-level space indents, no trailing whitespace
2007-07-14 21:24:38 +00:00
Daniel Stenberg
e0254f3936
removed compiler warnings, narrowed some source lines, killed trailing
...
whitespace
2007-07-14 20:54:47 +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
530e57d4ac
Gavrie Philipson sumitted a patch to get the actual text of the error
...
on scp upload.
2007-07-05 11:08:17 +00:00
James Housley
0742a972c1
Created libssh2_sftp_readdir_ex() and updated LIBSSH2_APINO to 200706151200
2007-06-15 17:22:49 +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
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
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
34bcc69a1a
Add more of the new programs to be ignored
2007-04-22 19:53:58 +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
d79939fc3a
Commit the version that actually uses the non-blocking code
2007-04-22 15:05:06 +00:00
James Housley
c5fb9d8f1a
Commit the version that actually uses the non-blocking read
2007-04-22 14:51:21 +00:00
James Housley
e85a2199b6
Update comment
2007-04-22 14:47:27 +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
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
James Housley
75ac861c7a
* Explicity set blocking
2007-04-22 13:10:48 +00:00
James Housley
04e975b6c7
Unless we tell libssh2 that we are blocking, which we are because didn't
...
set the socket to non-blocking it will think we are in non-blocking mode
in a lot of places
2007-04-22 11:01:54 +00:00
James Housley
f14aa01bb8
Add comment about setting non-blocking
2007-04-22 11:00:02 +00:00
James Housley
f8fe38e3a5
Create a simple test for sftp readdir with non-blocking
2007-04-21 18:08:00 +00:00
Simon Josefsson
0ace54f5b6
Add.
2007-03-27 13:27:13 +00:00
Daniel Stenberg
689c394c57
Added sftpdir, a sample doing an SFTP directory listing
2007-02-23 11:18:41 +00:00
Daniel Stenberg
1ce26ef4a2
add include to fix compiler warning
2007-02-08 14:50:33 +00:00
Daniel Stenberg
92c75854fb
Guenter Knauf added support for another IP and I changed the order of the
...
arguments and updated some comments.
2007-02-08 14:44:32 +00:00
Daniel Stenberg
4f1cfb20a9
1 - new public function libssh2_trace() that enables tracing/debug output on
...
various stuff if libssh2 was built with debug. If built without debug, the
function does nothing.
2 - configure --enable-debug is now enough to build a debug version (including
picky compiler options)
3 - internally, we no longer need/use #ifdef/#endif around all uses of the
_libssh2_debug() function/macro.
The scp.c example is the first application to test this new debug logging.
2007-02-02 23:23:36 +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
Daniel Stenberg
09ee2d4086
Chris Nystrom helped me realize I must count the received bytes myself to
...
know when the transfer is complete
2007-02-01 22:39:45 +00:00
Daniel Stenberg
5859642888
oops, it shouldn't be non-blocking when doing blocking transfers...
2007-01-30 11:10:26 +00:00
Daniel Stenberg
ba1eb9f8fc
simple (blocking) SCP transfer
2007-01-30 11:07:14 +00:00
Daniel Stenberg
e2f6518d95
two simple samples
2007-01-24 14:15:36 +00:00