Subject: About libssh2_channel_read

About libssh2_channel_read

From: sebastien isquierdo <quiseb_at_yahoo.fr>
Date: Tue, 9 Mar 2010 11:29:44 +0000 (GMT)

Hello,

I got an application which listen on a port and use libssh2 to connect to a SSH Server and make port forwarding to MySQL.

It works fine with 1 connection.
I'm trying now to make 2 or more connections to MySQL through SSH.

Actually, i do this :
- create a non-blocking session (libssh2_session_init, )
- start the session (libssh2_session_startup)
- Listen every connections to my local port (create new socket)
- and for each,create a new channel (libssh2_channel_direct_tcpip_ex)
- for each socket write on the good channel (libssh2_channel_write)
- and listen to the good channel to (libssh2_channel_read)

I make a new thread for reading on every channel.

My problem is libssh2_channel_read returns informations only from on the last created channel and nothing from the others.

Thanks for any advice.

Sébastien.

      
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-03-09