Function connect

  • Creates a TCP connection to the specified address.

    Type Parameters

    • Host extends string

    • Port extends string

    Parameters

    • address: SocketAddress | `${Host}:${Port}`

      Hostname and port number of the destination TCP server to connect to.

    • Optional opts: SocketOptions

      Socket options, for example to create a secure TLS connection.

    Returns Socket

Generated using TypeDoc