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 CHANGED
@@ -32,7 +32,8 @@ function isValidUser(s) {
32
32
  (c >= 65 && c <= 90) || // A-Z
33
33
  (c >= 97 && c <= 122) || // a-z
34
34
  c === 95 || // _
35
- c === 45 // -
35
+ c === 45 || // -
36
+ c === 46 // .
36
37
  ) continue;
37
38
 
38
39
  return false;
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "upcore-tcp",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Upcore Web framework support http websocket",
5
5
  "keywords": [
6
6
  "upcore",