www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Multiple connections in a single SSH reverse tunnel

Re: Multiple connections in a single SSH reverse tunnel

From: Atri Sharma <atri.jiit_at_gmail.com>
Date: Wed, 24 Jul 2013 23:29:54 +0530

Yes, but the issue I am facing is that I need to detect that I have a
new incoming connection and then spawn a new thread for forwarding it
to the local port,right?

I tried to do a forward_ex call, and put a call to accept(listener)
and spawned a new thread for processing it in a while loop.

The main problem is that when I try to re use the same listener in the
loop for constantly listening for incoming connections, the second
time, it doesnt open (I get 'couldnt open tcpip listner').

What am I doing wrong?



On Wed, Jul 24, 2013 at 11:25 PM, Peter Stuge <peter_at_stuge.se> wrote:
> Atri Sharma wrote:
>> I understand that, but I was trying to understand how it can be done.
>> I am not looking for code, but just for an idea.
> select() and non-blocking libssh2_channel_read/_write().
> //Peter
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-07-24

the libssh2 team