commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Eckenfels <e...@zusammenkunft.net>
Subject [VFS] Re: underlying usage of Jsch Sessions/Channels
Date Wed, 12 Nov 2014 00:25:13 GMT
Hello,

If I read the code correct, it will create a channel for each
concurrent stream. When the channel is no longer used it will close
all, besides the last channel. This allows sequentiel operations to work
without re-establishing a channel.

New channels seem to be established within a existing session only (so
no parallel tcp seems to be used):

https://github.com/apache/commons-vfs/blob/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java#L111

Gruss
Bernd

Am Tue, 11 Nov 2014 16:24:48 +0200 schrieb Israel
Malachi <israelm@ellipsis.co.il>:

> Hello all
> 
> Please consider the following code:
> 
>     FileSystemManager fsManager = VFS.getManager();
>     FileObject sftpDir =
> fsManager.resolveFile("sftp://username:password@host/pub/downloads/");
>     FileObject child1 =  sftpDir.getChild("child1.data");
>     FileObject child2 =  sftpDir.getChild("child2.data");
>     InputStream s1 = child1.getContent().getInputStream();
>     InputStream s2 = child2.getContent().getInputStream();
> 
> On the Jsch underlying level, were two separated sessions created, or
> one session and two channels?
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message