Jakob Egger
a1e744bb5e
direct_tcpip: Fixed channel write
...
There were 3 bugs in this loop:
1) Started from beginning after partial writes
2) Aborted when 0 bytes were sent
3) Ignored LIBSSH2_ERROR_EAGAIN
See also:
https://trac.libssh2.org/ticket/281
https://trac.libssh2.org/ticket/293
2015-03-15 11:20:17 +01:00
Alexander Lamaison
6bf8983368
CMake build system.
...
Tested:
- Windows:
- Visual C++ 2005/2008/2010/2012/2013/MinGW-w64
- static/shared
- 32/64-bit
- OpenSSL/WinCNG
- Without zlib
- Linux:
- GCC 4.6.3/Clang 3.4
- static/shared
- 32/64-bit
- OpenSSL/Libgcrypt
- With/Without zlib
- MacOS X
- AppleClang 6.0.0
- static
- 64-bit
- OpenSSL
- Without zlib
Conflicts:
README
2015-03-12 22:48:38 +00:00
Marc Hoersken
8a731d6217
examples on Windows: use native SOCKET-type instead of int
...
And check return values accordingly.
2014-12-22 17:03:42 +01:00
Marc Hoersken
be95032e29
examples: fixed mixed line-endings introduced with aedfba25b8
2014-12-15 01:09:13 +01:00
Marc Hoersken
977dbb7511
examples on Windows: check for socket return code
...
Fixes VS2012 code analysis warning C28193:
The variable holds a value that must be examined
2014-12-15 00:58:57 +01:00
Marc Hoersken
aedfba25b8
examples on Windows: check for WSAStartup return code
...
Fixes VS2012 code analysis warning C6031:
return value ignored: <function> could return unexpected value
2014-12-15 00:58:56 +01:00
Kamil Dudka
b31e35aba6
examples: use stderr for messages, stdout for data
...
Reported by: Karel Srot
Bug: https://bugzilla.redhat.com/867462
2012-10-22 13:39:58 +02:00
Daniel Stenberg
7ed53e21fd
libssh2_session_startup(3) => libssh2_session_handshake(3)
...
Propagate for the current function in docs and examples.
libssh2_session_startup() is deprecated.
2011-09-09 23:17:04 +02:00
Daniel Stenberg
f285438022
direct_tcpip: bring back inclusion of libssh2_config.h
...
In order to increase portability of this example, I'm bringing
the inclusion of libssh2_config.h back, and I also added an
require that header for this example to compile.
I also made all code lines fit within 80 columns.
2010-06-03 13:55:54 +02:00
Simon Josefsson
7301036421
Eat our own dog food, call libssh2_init and libssh2_exit in the examples.
2010-03-19 09:35:00 +01:00
Dave McCaldon
ea914c8b72
Resolve compile issues on Solaris x64 and UltraSPARC
...
Solaris builds of libssh2-1.2.3 failed on both x64 and UltraSPARC
platforms because of two problems:
1) src/agent.c:145 sun is a reserved word when using the SUNWspro compiler
2) example/direct_tcpip.c:84 INADDR_NONE is not defined
2010-02-09 11:19:52 +01:00
Peter Stuge
68a900d27a
Detect when the forwarded connection is closed in example/direct_tcpip.c
2010-01-30 00:45:56 +01:00
Peter Stuge
e4b7baa885
Fix example/direct_tcpip.c to work also on WIN32
...
read() and write() are no good for WIN32 sockets, use recv() and send().
2010-01-30 00:35:05 +01:00
Peter Stuge
d3dbe4c81e
Simplify WIN32 ifdefs in example/direct_tcpip.c to allow standalone compile
2010-01-30 00:01:51 +01:00
Peter Stuge
6df87e64b7
Use LIBSSH2_HOSTKEY_HASH_SHA1 instead of _MD5 in examples and tests
...
MD5 support is optional and may not always be available, while SHA1 is both
required and recommended.
2010-01-29 23:06:31 +01:00
Peter Stuge
6c543545fe
Make example/direct_tcpip.c compile for win32
...
One warning from FD_SET() remains, it is also in some other examples.
2010-01-29 20:35:24 +01:00
Daniel Stenberg
e3d8c1cfed
generate a libssh2_config.h in the example dir
...
buildconf copies the template to example/ and configure makes sure
to generate a proper file from it and the direct_tcpip.c example
is the first one to use it - to make sure it builds fine on more
paltforms
2010-01-13 13:46:56 +01:00
Simon Josefsson
11a114ee7c
Remove redundant #includes and reorder sys/types.h include.
2010-01-13 11:03:26 +01:00
Peter Stuge
bd0505d6b9
Add a direct-tcpip example which shows local port forwarding
2009-12-24 02:18:39 +01:00