edtFTPnet/Express - Class Reference

ExFTPConnection Class

Extension to FTPConnection providing advanced features including multi-file operations, asynchronous programming methods, visual design tools and support for SOCKS proxies.

For a list of all members of this type, see ExFTPConnection Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         EnterpriseDT.Net.Ftp.FTPConnection
            EnterpriseDT.Net.Ftp.ExFTPConnection

public class ExFTPConnection : FTPConnection, ICloneable, IXmlSerializable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

ExFTPConnection provides a range of advanced features that save development time and improve the quality of applications using FTP. These features include:

ExFTPConnection also provides the connectivity for our range of FTP Visual Controls, which are .NET GUI Controls that can be dropped onto Windows Forms to add sophisticated visual FTP application features with virtually no programming.

Multi-file Operations are methods that operate on multiple files. Operations that can be done of multiple files are:

FTP and FTPS (unlike SFTP) have certain characteristics that can sometimes cause problems when transferring a large number of files in a short time. ExFTPConnection can be configured to avoid these problems by means of the MultiTransferSleepEnabled, MultiTransferCountBeforeSleep and MultiTransferSleepTime properties.

Asynchronous Methods are supported by means of a large number of Begin___() and End___() methods. Nearly every synchronous method offered in FTPConnectionand ExFTPConnection has matching asynchronous operations in the form of a matching Begin___() and End___() pair of methods. The following example illustrates the use of BeginDownloadFile

  private void button1_Click(object sender, System.EventArgs e)
  {
    exFTPConnection1.BeginDownloadFile(fileName, fileName, new AsyncCallback(DownloadComplete), fileName);
  }

  private void DownloadComplete(IAsyncResult ar)
  {
    exFTPConnection1.EndDownloadFile(ar);
    label1.Text = "Finished downloading " + (string)ar.AsyncState;
  }
The button1_Click method initiates the download using the BeginDownloadFile method and returns immediately (i.e. before the file has been downloaded). The DownloadComplete method is then called once the file has been downloaded allowing us to notify the user of this fact. Since the download happens in the background the application may perform other processing while the file is being downloaded.

The Connection Tester may be used to assist with setting the properties of ExFTPConnection. It allows the developer to test various property-settings interactively without running their application. The Connection Tester may be accessed by (1) double-clicking on the component, (2) right-clicking on the component and selecting "Connection Designer" from the context menu, or (3) selecting the component and then clicking on the "Connection Tester" link at the bottom of the Properties View.

Proxy Settings may be controlled through the ProxySettings property.

Requirements

Namespace: EnterpriseDT.Net.Ftp

Assembly: edtFTPnetEx (in edtFTPnetEx.dll)

See Also

ExFTPConnection Members | EnterpriseDT.Net.Ftp Namespace