The CONNECT command is used to connect to the remote FTP server.
Syntax:
Command | Keyword | Value | Developer notes |
|---|---|---|---|
CONNECT | HOST | host:port | Required. Remote host. |
SECURE | *NO | Default. Indicates a plain data connection is to be used. | |
*YES | Initially connects to the remote FTP server using a plain socket then changes to SSL/TLS connection using the AUTH subcommand. | ||
*IMPLICIT | Indicates a secure control channel directly to the SSL/TLS FTP server is required. | ||
PROTECTION | *NO | Default. Indicates a clear data channel is required. | |
*YES | Indicates the data channel is to be secure. | ||
PORT_ADDRESS | address | Optional. The local IP address used by the PORT subcommand. Not typically used but indicates the IP address has been dynamically allocated, such as a PPP dialup connect after the JSM has been started. | |
ENCODING | *DEFAULT | Default. The remote server path encoding. | |
WAIT | milliseconds | Read timeout. The default value is 0. | |
TIMEOUT | milliseconds | The host connection timeout in milliseconds. Default indicates an infinite timeout or an operating system timeout. |
Example
CONNECT HOST(ftpserver) TIMEOUT(10000) WAIT(5000)