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