Skip to main content
function connect
connect(
options: NetConnectOpts,
connectionListener?: () => void,
): Socket
Deprecated

Aliases to createConnection.

Possible signatures:

Parameters

optional
connectionListener: () => void

Return Type

connect(
port: number,
host?: string,
connectionListener?: () => void,
): Socket
Deprecated

Parameters

port: number
optional
host: string
optional
connectionListener: () => void

Return Type

connect(
path: string,
connectionListener?: () => void,
): Socket
Deprecated

Parameters

path: string
optional
connectionListener: () => void

Return Type

Back to top