'Declaration Public NotInheritable Class FtpConnection Implements System.IDisposable
'Usage Dim instance As FtpConnection
public sealed class FtpConnection : System.IDisposable
'Declaration Public NotInheritable Class FtpConnection Implements System.IDisposable
'Usage Dim instance As FtpConnection
public sealed class FtpConnection : System.IDisposable
The FtpConnection class implements the System.IDisposable interface meaning that every FtpConnection object that is created should also be disposed of by calling the Dispose method or, in C#, creating the FtpConnection within a using block. If an instance of an FtpConnection object is not disposed of, connections with the FTP server may remain active until the FTP server times-out or the garbage-collector passes.
The FtpConnection will create connections with the FTP server transparently and as necessary until it is disposed of or garbage-collected. To prevent connections with an FTP server from being kept alive, the CloseConnections method can be called. The CloseConnections method will close any connections that are not being used, however the FtpConnection instance will remain usable.
To test if a connection with the specified FTP server is possible before the FtpConnection instance is passed to FtpFile or FtpFolder objects, the TestConnection method can be used. If a connection with an FTP server is not possible, exceptions will be thrown when trying to access properties of the FtpFile and/or FtpFolder instances.
System.Object
Xceed.Ftp.FtpConnection
Name | Description | |
---|---|---|
![]() | FtpConnection Constructor | Overloaded. |
Name | Description | |
---|---|---|
![]() | ClearCommandChannel | Gets or sets a value indicating whether to clear the command channel after login to facilitate firewall NAT when using a secure data channel. |
![]() | DataChannelProtection | |
![]() | DefaultRepresentationType | Gets or sets the default value indicating how the data is transferred to and from the FTP server. |
![]() | Encoding | Gets or sets the System.Text.Encoding that is used to encode commands sent to the server, and decode replies and folder listings received from the server. |
![]() | FxpPassiveTransfer | Gets or sets a Boolean value indicating if FXP file transfers use the passive method or not to initiate the data connection. |
![]() | FxpTransferPolicy | Gets or sets a FxpTransferPolicy value that indicates if FXP file transfers are allowed and what kind of transfers can be made. |
![]() | HostName | Gets the hostname of the FTP server to which a connection has been established. |
![]() | KeepAliveInterval | Gets or sets the interval, in seconds, at which a NOOP command is sent on the command channel while idle or during a file transfer. |
![]() | ListingMethod | Gets or sets the ListingMethod that will be used to retrieve folder contents from the FTP server. |
![]() | ListingParsers | Gets a collection of FtpListingParser objects that are used to parse the lines returned by calls to various methods. |
![]() | LocalAddress | Gets or sets the client-side IP address and port. |
![]() | LocalDataAddress | Gets or sets the IP address and port of the client-side data connection to use in subsequent data connections. If PassiveTransfer is false, this property represents the address of the client-side listening socket waiting for the server’s data connection request. |
![]() | PassiveTransfer | Gets or sets a boolean value indicating whether the data connection should be established by the FTP server rather than by the client-side. |
![]() | Password | Gets the password used to connect to the FTP server. |
![]() | Port | Gets the port of the FTP server to which a connection has been established. |
![]() | PreAllocateStorage | Gets or sets a boolean value indicating if the FTP server must reserve enough space before a file is sent. |
![]() | Proxy | Gets or sets the active proxy client for connecting to the FTP server. |
![]() | SendTelnetInterruptSignal | |
![]() | SendTypeCommand | Gets or sets a boolean value indicating if the TYPE command should be sent before initiating a file transfer. |
![]() | ServerAddress | Gets the IP address and port of the FTP server to which a connection has been established. |
![]() | ServerFolderSeparator | Gets or sets the FTP server's folder separator character. |
![]() | SynchronizingObject | Gets or sets the object used to automatically redirect events on the main UI thread. |
![]() | Timeout | Gets or sets a value, in seconds, indicating after what period of time an FTP operation should timeout. |
![]() | TraceWriter | Gets or sets the System.IO.TextWriter which will trace the communications between the client-side and the FTP server. |
![]() | TraceWriterTimestampFormat | |
![]() | TraceWriterTimestampFormatProvider | |
![]() | TraceWriterTimestampUTC | |
![]() | TransferMode | Gets or sets the transfer mode used to send and receive data to and from an FTP server. |
![]() | UseRemoteAddress | Gets or sets a value indicating whether to use the remote address. |
![]() | UserName | Gets the username used to connect to the FTP server. |
Name | Description | |
---|---|---|
![]() | CloseConnections | Close any pending connections. |
![]() | Dispose | Release all cached connections. |
![]() | TestConnection | Tests if a connection with the specified FTP server is possible before the FtpConnection instance is passed to FtpFile or FtpFolder objects. |
Name | Description | |
---|---|---|
![]() | CertificateReceived | Raised when an FTP server's certificate has been received and verified. Note: This event is not available in Xceed FTP for .NET Compact Framework because this product does not support Secure FTP. |
![]() | CertificateRequired | Raised when a client certificate is required by the FTP server, or the one provided (if e.Certificate is not NULL) was rejected. |
![]() | ParsingListingLine | Raised when a listing line is received from the FTP server. |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2