Sorry guys my fault. I forgot use ssh_channel_poll before read from channel. Now it works fine.
Thanks for work you
did and you are doing on
libssh.
Regards.
TH
Dne 5.3.2013 21:53, "Ing. Tomáš
Havránek" napsal(a):
Hello,
I am new
with libssh and trying to use it in my project. I want to use libssh to direct
port forwarding for tunneling connection from
my app to Firebird DB
on remote server. Because project is
programmed in C# I wrote
little wrapper for
libssh library but there's no problem I
think.
I'm able to connect to
the remote server, authorize user and create forwarding channel when I need
connection to the Firebird server. While I using only one channel there is no problem and I can read and write data
trough open channel with ssh_channel_read and ssh_channel_write
functions. The problem
occures when
I want to serve second
connection to Firebird server and
create second forward channel (so
there are two living fwd channels in one
session). Then I can't
read data from channel after few readings and writings
happens on the second channel (not
same count of r/w every time -
it varies from connection
to connection). I tried to
use callback function
(ssh_channel_data_callback) on channel and it
seems that the data is
present because callback function is
fired up. But then data is not
"transfered" to ssh_channel_read function.
So there are my questions:
Can be used two fwd
channels in one session to transfer
data at the same time?
Can be used two fwd
channels in one session to transfer
data with use of
ssh_channel_read and ssh_channel_write
functions at
the same time?
Or should I use
ssh_channel_select function?
Is there
any trick to make
it work?
Thank you very
much for your help. Sorry for my English.
Regards,
Tomas Havranek
|