net.createConnection(path[, connectListener])
path<string> 套接字应连接的路径。将传递给socket.connect(path[, connectListener])。见 识别 IPC 连接的路径。connectListener<Function>net.createConnection()函数的常用参数,发起套接字'connect'事件的一次性监听器。将传递给socket.connect(path[, connectListener])。- 返回值: <net.Socket> 用于启动连接的新创建套接字。
启动 IPC 连接。
【Initiates an IPC connection.】
此函数创建一个所有选项均为默认值的新 net.Socket,立即使用 socket.connect(path[, connectListener]) 发起连接,然后返回开始连接的 net.Socket。
【This function creates a new net.Socket with all options set to default,
immediately initiates connection with
socket.connect(path[, connectListener]),
then returns the net.Socket that starts the connection.】