net.createConnection(port[, host][, connectListener])


发起 TCP 连接。

🌐 Initiates a TCP connection.

此函数创建一个新的 net.Socket,所有选项都设置为默认值,立即与 [socket.connect(端口[, 主机]][, connectListener] 建立连接 socket.connect(port),然后返回启动连接的 net.Socket`。

🌐 This function creates a new net.Socket with all options set to default, immediately initiates connection with socket.connect(port[, host][, connectListener]), then returns the net.Socket that starts the connection.