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, Duration.Zero, means that the system timeout will be used (which is usually pretty long).

  1. Response connect(IpAddress address, ushort port = 21, Duration timeout = Duration.zero())
    class Ftp
    connect
    (
    ,
    ushort port = 21
    ,
    Duration timeout = Duration.zero()
    )
  2. Response connect(const(char)[] address, ushort port = 21, Duration timeout = Duration.zero())

Parameters

address
Type: IpAddress

Address of the FTP server to connect to

port
Type: ushort

Port used for the connection

timeout
Type: Duration

Maximum time to wait

Return Value

Type: Response

Server response to the request.

Meta