gftp/mode

FTP Mode

Types

Connection mode for data channel

pub type Mode {
  Active(timeout: Int)
  Passive
  ExtendedPassive
}

Constructors

  • Active(timeout: Int)

    Active mode with a timeout for the data connection. The timeout is used to prevent hanging connections in active mode, where the server connects back to the client for data transfer. If the server doesn’t connect within the specified timeout, the client can close the connection and report an error.

  • Passive
  • ExtendedPassive

    Required by some servers (ipv6); defined in rfc 2428 https://www.rfc-editor.org/rfc/rfc2428#section-3

Search Document