socket.connect(port[, host][, connectListener])


在给定的套接字上发起 TCP 连接。

🌐 Initiate a TCP connection on the given socket.

别名为 socket.connect(options[, connectListener]),调用时将 {port: port, host: host} 作为 options

🌐 Alias to socket.connect(options[, connectListener]) called with {port: port, host: host} as options.