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.