socket.connect(path[, connectListener])
path<string> 客户端应连接的路径。参见 识别 IPC 连接的路径。connectListener<Function>socket.connect()方法的常用参数。一旦被添加,将作为'connect'事件的监听器。- 返回:<net.Socket> 套接字本身。
在给定的套接字上启动 IPC 连接。
🌐 Initiate an IPC connection on the given socket.
别名于 socket.connect(options[, connectListener]),调用时使用 { path: path } 作为 options。
🌐 Alias to
socket.connect(options[, connectListener])
called with { path: path } as options.