Method FTPClient2():connect() Foundation
Establishes a connection.
:connect( [<cMode>] ) --> lSuccess
.T. (true) if the connection is established successfully, .F. (false) otherwise.
Establishes a connection to the FTP server using the provided connection mode. The connection mode can be either "active" or "passive". In passive mode, the client initiates all connections, which is useful when the client is behind a firewall. In active mode, the server connects back to the client for data transfers. The default mode is "passive".
If the connection fails, use :getLastError() and :getLastMessage() methods to obtain detailed error information. Common failure reasons include network issues, invalid credentials, or server unavailability.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.