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


初始化一个 TCP 连接。

这个函数用默认配置创建一个新的 net.Socket,然后 socket.connect(port[, host][, connectListener]) 初始化一个连接,并返回开启连接的那个 net.Socket

Initiates a TCP connection.

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.