SocketTools .NET Edition

FtpClient.FtpOptions Enumeration

The supported options for establishing a connection with the server.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

[Visual Basic]
<Flags>
Public Enum FtpClient.FtpOptions
[C#]
[Flags]
public enum FtpClient.FtpOptions

Remarks

The FtpOptions enumeration specifies one or more options to be used when establishing a connection with a server.

Members

Member Name Description Value
None No option specified. 0
Default The same as specifying the Passive option. 1
Passive This option specifies the client should attempt to establish a passive connection to the server. This means that instead of the client opening a port on the local system and waiting for the server to establish a connection back to the client, the client will establish a second data connection to the server. This mode is recommended for most systems that are behind a NAT router or firewall. 1
Firewall This option specifies the client should always use the host IP address to establish the data connection with the server, not the address returned by the server in response to the PASV command. This option may be necessary if the server is behind a router that performs Network Address Translation (NAT) and it returns an unreachable IP address for the data connection. If this option is specified, it will also enable passive mode data transfers. 2
NoAuth This option specifies the server does not require authentication, or that it requires an alternate authentication method. When this option is used, the client connection is flagged as authenticated as soon as the connection to the server has been established. Note that using this option to bypass authentication may result in subsequent errors when attempting to retrieve a directory listing or transfer a file. It is recommended that you consult the technical reference documentation for the server to determine its specific authentication requirements. 4
KeepAlive This option specifies the client should attempt to keep the connection with the server active for an extended period of time. It is important to note that regardless of this option, the server may still choose to disconnect client sessions that are holding the command channel open but are not performing file transfers. 8
VirtualHost This option specifies the server supports virtual hosting, where multiple domains are hosted by a server using the same external IP address. If this option is enabled, the client will send the HOST command to the server upon establishing a connection. 512
Verify This option specifies that file transfers should be automatically verified after the transfer has completed. If the server supports the XMD5 command, the transfer will be verified by calculating an MD5 hash of the file contents. If the server does not support the XMD5 command, but does support the XCRC command, the transfer will be verified by calculating a CRC32 checksum of the file contents. If neither the XMD5 or XCRC commands are supported, the transfer is verified by comparing the size of the file. Automatic file verification is only performed for binary mode transfers because of the end-of-line conversion that may occur when text files are uploaded or downloaded. 1024
Tunnel This option specifies that a tunneled TCP connection and/or port-forwarding is being used to establish the connection to the server. This changes the behavior of the client with regards to internal checks of the destination IP address and remote port number, default capability selection and how the connection is established. This option also forces all connections to be outbound and enables the firewall compatibility features in the client. 65536
TrustedSite This option specifies the server is trusted. The server certificate will not be validated and the connection will always be permitted. This option only affects connections using the TLS protocols. 2048
Secure This option specifies the client should attempt to establish a secure connection with the server. The server must support secure connections using the TLS protocol. 4096
ImplicitTls This option specifies the client should attempt to establish a secure implicit TLS session. The TLS handshake is initiated immediately after the connection to the server has been established. 4096
ExplicitTls This option specifies the client should attempt to establish a secure explicit TLS session. The initial connection to the server is not encrypted, and the client will attempt to negotiate a secure connection by sending a command to the server. Some servers may require this option when connecting to the server on ports other than the default secure port of 990. 8192
SecureShell This option specifies the client should attempt to establish a secure connection using the Secure Shell (SSH) protocol. This option is automatically selected if the connection is established on port 22, the standard port for SSH connections. It is only necessary to specify this option if the SSH connection must be established on a non-standard port. 16384
SecureFallback This option specifies the client should permit the use of less secure cipher suites for compatibility with legacy servers. If this option is specified, the client will permit connections using TLS 1.0 and cipher suites that use RC4, MD5 and SHA1. 32768
PreferIPv6 This option specifies the client should prefer the use of IPv6 if the server hostname can be resolved to both an IPv6 and IPv4 address. This option is ignored if the local system does not have IPv6 enabled, or when the hostname can only be resolved to an IPv4 address. If the server hostname can only be resolved to an IPv6 address, the client will attempt to establish a connection using IPv6 regardless if this option has been specified. 262144
FreeThread This option specifies that class methods may be called from any thread, and not only the thread that established the connection. Using this option disables certain internal safety checks that are made by the class and may result in unexpected behavior unless you ensure that access to the class instance is synchronized across multiple threads. 524288
HiResTimer This option specifies that elapsed time values should be returned in milliseconds rather than seconds. This option is intended to provide greater accuracy with smaller file transfers over a high speed network connection. 1048576
TlsReuse This option specifies that TLS session reuse should be enabled when establishing a secure FTP connection. This option is only supported on Windows 8.1 or Windows Server 2012 R2 and later platforms, and should only be enabled when explicitly required by the server. This option can be used with TLS 1.2 and TLS 1.3, although the mechanism used for session resumption differs between protocol versions. 2097152

Requirements

Namespace: SocketTools

Assembly: SocketTools.FtpClient (in SocketTools.FtpClient.dll)

Version: 12.0.3041.1380