[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions about channels


Hello,
I have some questions about the channels and the callbacks.

1. How many forwarding channels can i use per SSH Connection?
2. I am trying to use a callback from libssh to tell me when i have some
data in the forwarding channel.
   I tried to use the channel_data_function to directly copy from the
channels connection to another socket that i have, like in
the samplesshd-tty sample. But the call back is not called. i did the
following steps:

struct ssh_channel_callbacks_struct *channel_cb = new struct
ssh_channel_callbacks_struct();
channel_cb->channel_data_function = &Connection::copy_chan_to_fd;
channel_cb->userdata = con;
ssh_callbacks_init(channel_cb);
ssh_set_channel_callbacks(forwarding_channel, channel_cb);

Am I missing something?
I dont want to use polling because i am using libevent to handle the
application, so i dont want to also use the polling system of libssh.

BR
--
-----
--------
João Pereira

Email: joao.almeida@xxxxxxxxxxx
Web: http://www.bluetc.es

Follow-Ups:
Re: Questions about channelsChristophe Grosjean <christophe.grosjean@xxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org