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

Archive Index This month's Index

Subject: Re: need help on multiple direct tcpip channels

Re: need help on multiple direct tcpip channels

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 11 Jan 2011 14:29:44 +0100 (CET)

On Tue, 11 Jan 2011, Dmitry Teslenko wrote:

> Is libssh2 capable of creating mutiple direct tcpip channels on win32
> platform?

I'm not aware of anything that would limit that ability so I would say yes.

> Is it capable of connect to one host and forward port to another host,
> i.e. -L<port>:<one host>:<port> <user>@<another host>?


> I there's not so much open source software that uses libssh2 to look for
> example.

Right. libssh2 is still to be discovered by the world! =)

> Can you point to usable example or provide hint how to do it?

I can only point to our docs, our examples and our source code.

> I guess channel init should be in blocking mode

You never _need_ to use blocking mode, but you can most often opt to use it.

> data transfer should be in non-blocking mode.

Yes, mostly due to the fact that you currently can't really figure out which
channel that has traffic when you know there's something to read from the
socket so you need to check them all and then you don't want to block on any.

> And blocking is global for all session.

I don't see the point with having it finer grained that so. Do you?

> There's no example of proper channel shutdown also.

libssh2_channel_close ?

  / daniel.haxx.se
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-01-11

the libssh2 team