cgserver 12.0.1 → 12.0.2

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.
@@ -102,7 +102,7 @@ class ISocket {
102
102
  this._packetParser.push(message);
103
103
  let packet = this._packetParser.parse();
104
104
  while (packet) {
105
- this._onMessage(packet);
105
+ this.onMessage(packet);
106
106
  packet = this._packetParser.parse();
107
107
  }
108
108
  }
@@ -110,9 +110,9 @@ class ISocket {
110
110
  Log_1.gLog.error(this.tipKey + ' Received Message Handle Error: ' + e);
111
111
  }
112
112
  }
113
- onMessage(message) {
113
+ onMessage(packet) {
114
114
  try {
115
- let msg = this._onDecode(message);
115
+ let msg = this._onDecode(packet);
116
116
  if (this._is_sync_msg) {
117
117
  SyncQueueTool_1.gSyncQueueTool.add(this._socket_id + "", this._onMessage, this, msg);
118
118
  }
@@ -51,7 +51,7 @@ export declare class ISocket {
51
51
  send_heartbeat(): void;
52
52
  onConnect(_socket: net.Socket): void;
53
53
  protected _onData(message: Buffer): void;
54
- onMessage(message: Buffer): void;
54
+ onMessage(packet: Buffer): void;
55
55
  protected _onDecode(message: Buffer, ...params: any[]): any;
56
56
  protected _onEncode(data: any, ...params: any[]): any;
57
57
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",