connect
connect<Host, Port>(address, opts?): Socket
Creates a TCP connection to the specified address.
Type Parameters
| Type Parameter |
|---|
Host extends string |
Port extends string |
Parameters
| Parameter | Type | Description |
|---|---|---|
address | SocketAddress | `${Host}:${Port}` | Hostname and port number of the destination TCP server to connect to. |
opts? | SocketOptions | Socket options, for example to create a secure TLS connection. |