Function connect

  • Creates a connection to the target host + port over the selected transport.

    Parameters

    • transport: Transport

      Type of transport for the connection.

    • host: string

      Hostname for the connection. Basic lookup using lookup will be performed.

    • Optionalport: string | number

      Destination port (where applicable).

    • Optionaloptions: ConnectOptions

      Extra connection options.

    Returns Promise<Connection | DatagramEndpoint>