Hi,

Glad you found solution to your problem.
There is no hard limit in the amount of channels but every server
implementation is free to enforce an arbitrary limit.

Aris

Le 4/04/14 08:48, Joao Pedro Almeida Pereira a écrit :
> Hello,
> I found out my problem, if i do not poll the socket the call back is
> never called......
> Can i have an answer about my first question? 
> Number of forwarding channels per SSH connection? I would like to
> understand if there is a limit of parallel channels? 
> 
> BR
> 
> 
> On 3 April 2014 14:08, Christophe Grosjean
> <christophe.grosj...@wallix.com <mailto:christophe.grosj...@wallix.com>>
> wrote:
> 
>     Yes, you are right, that is what the patch is doing. We had no
>     problem with callbacks on data reception.
> 
> 
>     ------------------------------------------------------------------------
>     *De: *"Joao Pedro Almeida Pereira" <joao.alme...@blue-tc.com
>     <mailto:joao.alme...@blue-tc.com>>
>     *À: *"libssh" <libssh@libssh.org <mailto:libssh@libssh.org>>
>     *Envoyé: *Jeudi 3 Avril 2014 12:22:11
>     *Objet: *Re: Questions about channels
> 
> 
>     Hello,
>     Looked at the patch that is not what i want.
>     I am not using the server. 
>     What i do is:
>          1 - Create a session
>          2 - create a forwarding channel
>          3 - set the callback
>          4 - leave this method
> 
>     After that what i need is when a packet arrives to the forwarding
>     channel, from the server, i want to be awaken to do some work.
> 
>     From what i see in the patch it will add callbacks to the server to
>     act upon an arrival of request of forward tunnel.
> 
> 
>     BR
> 
> 
>     On 3 April 2014 11:48, Christophe Grosjean
>     <christophe.grosj...@wallix.com
>     <mailto:christophe.grosj...@wallix.com>> wrote:
> 
>         I believe we had the same problem as you a few weeks ago.
>         Trouble is there is no callback called to manage forwarded-tcpip
>         (and neither for direct-tcpip).
> 
>         Loic Michaux provided a patch to implement missing
>         ssh_channel_open_request_forwarded_tcpip_callback and
>         ssh_channel_open_request_direct_tcpip_callback, because they are
>         not implemented. But it never got to the repository, looks like
>         it has been lost in the void. If you do not find it in the ML
>         archive, I can send it back.
> 
>         
> ------------------------------------------------------------------------
>         *De: *"Joao Pedro Almeida Pereira" <joao.alme...@blue-tc.com
>         <mailto:joao.alme...@blue-tc.com>>
>         *À: *"libssh" <libssh@libssh.org <mailto:libssh@libssh.org>>
>         *Envoyé: *Jeudi 3 Avril 2014 10:34:15
>         *Objet: *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.alme...@blue-tc.com <mailto:joao.alme...@blue-tc.com>
>         Web: http://www.bluetc.es <http://www.bluetc.es/>
> 
> 
> 
> 
>     -- 
>     --
>     -----
>     --------
>     João Pereira
> 
>     Email: joao.alme...@blue-tc.com <mailto:joao.alme...@blue-tc.com>
>     Web: http://www.bluetc.es <http://www.bluetc.es/>
> 
> 
> 
> 
> -- 
> --
> -----
> --------
> João Pereira
> 
> Email: joao.alme...@blue-tc.com <mailto:joao.alme...@blue-tc.com>
> Web: http://www.bluetc.es <http://www.bluetc.es/>

Reply via email to