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

Archive Index This month's Index

Subject: Re: multiple SFTP subsystem

Re: multiple SFTP subsystem

From: Peter Stuge <peter_at_stuge.se>
Date: Tue, 11 Jan 2011 06:03:07 +0100

zl liu wrote:
> I want to use multiple SFTP subsystem´╝Ü
> LIBSSH2_SESSION *session = libssh2_session_init();
> LIBSSH2_SFTP *sftp_session1 = libssh2_sftp_init(session);
> LIBSSH2_SFTP *sftp_session2 = libssh2_sftp_init(session);
> LIBSSH2_SFTP *sftp_session3 = libssh2_sftp_init(session);
> LIBSSH2_SFTP_HANDLE *sftp_handle1 = libssh2_sftp_open(sftp_sessions1, ...);
> LIBSSH2_SFTP_HANDLE *sftp_handle2 = libssh2_sftp_open(sftp_sessions2, ...);
> LIBSSH2_SFTP_HANDLE *sftp_handle3 = libssh2_sftp_open(sftp_sessions3, ...);
> How to make use of this three handles to transfer files faster, thanks!

This does not make your transfer faster because as you probably know
the SFTP channels are combined in one session, which means in one TCP

I think you only have two choices:

1. Help us improve performance of the libssh2 transport layer.
2. Use multiple separate TCP connections to the server. Note that
this is rather ugly behavior for a client, and note that you must
authenticate each connection.

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

the libssh2 team