SocketTools .NET Edition

FtpClient.FtpOptions Enumeration

Specifies the options that the FtpClient class supports.

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 FtpClient class uses the FtpOptions enumeration to specify one or more options to be used when establishing a connection with a remote host. Multiple options may be specified if necessary.

Members

Member Name Description Value
optionNone No option specified. 0
optionDefault The default connection option. This is the same as specifying optionPassive. 1
optionPassive This option specifies that 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
optionFirewall This option specifies that 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
optionNoAuth This option specifies that 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
optionKeepAlive This option specifies that 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
optionNoAuthRSA This option specifies that RSA authentication should not be used with SSH-1 connections. This option is ignored with SSH-2 connections and should only be specified if required by the remote host. This option has no effect on standard or secure connections using SSL. 16
optionNoPwdNul This options specifies that the user password cannot be terminated with a null byte. This option is ignored with SSH-2 connections and should only be specified if required by the remote host. This option has no effect on standard or secure connections using SSL. 32
optionNoRekey This option specifies that the client should never attempt a repeat key exchange with the server. Some SSH servers do not support rekeying the session, and this can cause the client to become non-responsive or abort the connection after being connected for an hour. This option has no effect on standard or secure connections using SSL. 64
optionCompatSID This compatibility option changes how the session ID is handled during public key authentication with older SSH servers. This option should only be specified when connecting to servers that use OpenSSH 2.2.0 or earlier versions. This option has no effect on standard or secure connections using SSL. 128
optionCompatHMAC This compatibility option changes how the HMAC authentication codes are generated. This option should only be specified when connecting to servers that use OpenSSH 2.2.0 or earlier versions. This option has no effect on standard or secure connections using SSL. 256
optionVirtualHost This option specifies that 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
optionVerify 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
optionTunnel 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 feature 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
optionTrustedSite This option specifies that the server is trusted. The server certificate will not be validated and the connection will always be permitted. This option only affects connections using either the SSL or TLS protocols. 2048
optionSecure This option specifies that the client should attempt to establish a secure connection with the server. The server must support secure connections using either the SSL or TLS protocol. 4096
optionImplicitSSL This option specifies that the client should attempt to establish a secure implicit SSL session. The SSL handshake is initiated immediately after the connection to the server has been established. 4096
optionExplicitSSL This option specifies that the client should attempt to establish a secure explicit SSL 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
optionSecureShell This option specifies that 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
optionFreeThread 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

Requirements

Namespace: SocketTools

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

See Also

SocketTools Namespace