nodejs-local-ipc
Advanced tools
+5
-3
| { | ||
| "name": "nodejs-local-ipc", | ||
| "version": "1.0.8", | ||
| "version": "1.0.9", | ||
| "description": "实现nodejs中兄弟进程的通信", | ||
@@ -9,3 +9,5 @@ "main": "src/index.js", | ||
| }, | ||
| "files": ["src"], | ||
| "files": [ | ||
| "src" | ||
| ], | ||
| "scripts": { | ||
@@ -30,4 +32,4 @@ "test": "echo \"Error: no test specified\" && exit 1" | ||
| "dependencies": { | ||
| "tiny-application-layer-protocol": "^1.0.0" | ||
| "tiny-application-layer-protocol": "^1.0.1" | ||
| } | ||
| } |
+2
-2
@@ -20,4 +20,4 @@ const net = require('net'); | ||
| if (!this.socket) { | ||
| if (os.platform() === 'win32') { | ||
| !~~this.options.port && (this.options.port = port); | ||
| if (os.platform() === 'win32' || this.options.isRPC) { | ||
| !~~this.options.port && (this.options.port = this.options.isRPC ? 80 : port); | ||
| delete this.options.path; | ||
@@ -24,0 +24,0 @@ } else { |
+4
-0
@@ -25,2 +25,6 @@ const fs = require('fs'); | ||
| super(); | ||
| if (typeof options === 'function') { | ||
| options = {}; | ||
| connectionListener = options; | ||
| } | ||
| this.options = { ...options }; | ||
@@ -27,0 +31,0 @@ // 根据平台处理参数 |
7636
2.29%180
2.27%