nx.js
NamespacesSwitchFunctions

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

ParameterTypeDescription
addressSocketAddress | `${Host}:${Port}`Hostname and port number of the destination TCP server to connect to.
opts?SocketOptionsSocket options, for example to create a secure TLS connection.

Returns

Socket

See

https://sockets-api.proposal.wintercg.org

On this page