upcore-tcp 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/checkType.js +2 -1
- package/lib/server.js +2 -3
- package/package.json +1 -1
package/lib/checkType.js
CHANGED
package/lib/server.js
CHANGED
|
@@ -109,8 +109,7 @@ module.exports = class{
|
|
|
109
109
|
this._core = this.config.use === 'https' ? tls : net;
|
|
110
110
|
}
|
|
111
111
|
listen(callback){
|
|
112
|
-
(this.server = this._core.createServer(this.config)
|
|
113
|
-
.on('connection', (socket)=>{
|
|
112
|
+
(this.server = this._core.createServer(this.config, (socket)=>{
|
|
114
113
|
let focus = 1;
|
|
115
114
|
let payloadLength = 0;
|
|
116
115
|
let req;
|
|
@@ -186,7 +185,7 @@ module.exports = class{
|
|
|
186
185
|
console.log(e);
|
|
187
186
|
socket.destroy();
|
|
188
187
|
}
|
|
189
|
-
})
|
|
188
|
+
}))
|
|
190
189
|
.on('error', (e)=>{
|
|
191
190
|
console.log(e);
|
|
192
191
|
});
|