Ftp.connect

Connect to the specified FTP server.

The port has a default value of 21, which is the standard port used by the FTP protocol. You shouldn't use a different value, unless you really know what you do. This function tries to connect to the server so it may take a while to complete, especially if the server is not reachable. To avoid blocking your application for too long, you can use a timeout. The default value, Time::Zero, means that the system timeout will be used (which is usually pretty long).

  1. Response connect(IpAddress address, ushort port, Duration timeout)
  2. Response connect(string address, ushort port, Duration timeout)
    class Ftp
    connect
    (
    string address
    ,
    ushort port = 21
    ,
    Duration timeout = Duration.zero()
    )

Parameters

address string

Name or ddress of the FTP server to connect to.

port ushort

Port used for the connection.

timeout Duration

Maximum time to wait.

Return Value

Type: Response

Server response to the request.

Meta