A single instance of ExFTPConnection and SecureFTPConnection can transfer multiple files at the same time, which can greatly speed up the transfer of multiple files.
This capability is disabled by default but may be enabled by setting ConcurrentTransferSettings. Enabled to true. Once enabled, the connection will use up to ConcurrentTransferSettings.MaxConnections to transfer files.
For example, to configure a connection to use up to 5 connections to transfer files:
ftpConnection.ConcurrentTransferSettings.Enabled = true;
ftpConnection.ConcurrentTransferSettings.MaxConnections = 5;
If MaxConnections is not set then the default of 3 will be used.
Once ConcurrentTransferSettings.Enabled has been to true then transfers will be allocated to the 'pool' of connections as they become available.
Advanced Options
Interactive applications, such as traditional FTP clients, can benefit from reserving one connection for user-actions, such as fetching directory listings. Thus when ConcurrentTransferSettings.PoolMode is set to PoolMode.ReserveMainConnection the main connection will not usually be used for transfers.
This is not an issue in non-interactive applications in which case the ConcurrentTransferSettings.PoolMode may be set to PoolMode.UseMainConnection.
The default value of ConcurrentTransferSettings.PoolMode is PoolMode.Automatic where the main connection will used if System.Windows.Forms.Form.ActiveForm is not null.
Although it is generally desirable to reserve the main connection for user interactivity in FTP client-type applications, this cannot be done if the server only permits one connection to the server. If ConcurrentTransferSettings.FallBackToMainConnection is set to true (the default) then the main connection will be used for transfers if it is the only possible connection to the server.
If ConcurrentTransferSettings.AutoRequeue is enabled then a task that has been given a failed connection will automatically be requeued if at least one connection is still operational.