function createConnection
Jump to headingcreateConnection(options: NetConnectOpts,connectionListener?: () => void,): SocketA factory function, which creates a new Socket,
immediately initiates connection with socket.connect(),
then returns the net.Socket that starts the connection.
When the connection is established, a 'connect' event will be emitted
on the returned socket. The last parameter connectListener, if supplied,
will be added as a listener for the 'connect' event once.
Possible signatures:
- createConnection
- createConnection for
IPCconnections. - createConnection for TCP connections.
The connect function is an alias to this function.
Parameters Jump to heading
Jump to headingoptions: NetConnectOptsoptional
Jump to headingconnectionListener: () => voidReturn Type Jump to heading
Jump to headingcreateConnection(port: number,host?: string,connectionListener?: () => void,): SocketParameters Jump to heading
Jump to headingport: numberoptional
Jump to headinghost: stringoptional
Jump to headingconnectionListener: () => voidReturn Type Jump to heading
Jump to headingcreateConnection(path: string,connectionListener?: () => void,): SocketParameters Jump to heading
Jump to headingpath: stringoptional
Jump to headingconnectionListener: () => void