Hello, I'm trying to use libssh2 example ssh2_exec.c slightly modified
in order to experiment keepalive support.
I modified the following line:
// Here I want a blocking session
libssh2_session_set_blocking(session, 0); --->
libssh2_session_set_blocking(session, 1);
and added the following:
libssh2_keepalive_config(session, 1, 20);
just before the call to libssh2_channel_open_session(). Now I use this
version of ssh2_exec to exec the command
tail -f file
on my remote host. No one is writing on file on the remote host.
What happens is that my ssh connection (on my side) times-out and is
closed. Is this a feature of libssh2? does the connection times-out
because no IO is done since no one is writing on the file on the remote
host? Or am I missing something in using keepalives?
thank you
Alberto
--
Dr. Villa Alberto
Sw Engineer
SeleTech srl
via Collodi, 8 20052 Monza (MI)
tel: +39 039 5962000
fax: +39 039 9716905
email: a.villa_at_seletech.com
web: www.seletech.com
www.seletech.eu
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-02-28