Browse Source

delete max playlod

Paul 5 years ago
parent
commit
6abfe33a94
1 changed files with 2 additions and 7 deletions
  1. 2
    7
      src/client.ts

+ 2
- 7
src/client.ts View File

2
 import { Packet } from './packet';
2
 import { Packet } from './packet';
3
 import { Utils } from './utils';
3
 import { Utils } from './utils';
4
 
4
 
5
-/**
6
- * 数据包默认最大发送的数据量大小
7
- */
8
-const MAX_PAYLOAD = 1024 * 1024;
9
-
10
 /**
5
 /**
11
  * 初始化链接以及收发数据
6
  * 初始化链接以及收发数据
12
  */
7
  */
30
     this.listeners = new Map<number, (data: string) => void>();
25
     this.listeners = new Map<number, (data: string) => void>();
31
     this.requestHeader = '';
26
     this.requestHeader = '';
32
     this.requestHeader = '';
27
     this.requestHeader = '';
33
-    this._maxPayload = MAX_PAYLOAD;
28
+    this._maxPayload = 1024 * 1024;
34
     this.url = url;
29
     this.url = url;
35
     this.reconnectTimes = 0;
30
     this.reconnectTimes = 0;
36
     this.readyStateCallback = readyStateCallback;
31
     this.readyStateCallback = readyStateCallback;
328
   }
323
   }
329
 }
324
 }
330
 
325
 
331
-export { Client, MAX_PAYLOAD };
326
+export { Client };