@cimo/websocket 1.5.49 → 1.5.50

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.
@@ -15,7 +15,7 @@ export default class Manager {
15
15
  checkStatus: (mode: string, callback: () => void) => void;
16
16
  sendMessage: (mode: string, data: model.TsendData, tag?: string, timeout?: number) => void;
17
17
  sendDataBroadcast: (data: model.TsendData) => void;
18
- sendDataUpload: (filename: string, file: ArrayBuffer) => void;
18
+ sendDataUpload: (fileName: string, file: ArrayBuffer) => void;
19
19
  sendDataDirect: (dataValue: model.TsendData, clientId: string) => void;
20
20
  receiveData: <T>(tag: string, callbackValue: model.IcallbackReceiveData<T>) => void;
21
21
  receiveDataDownload: (callback: model.IcallbackReceiveDataDownload) => void;
@@ -172,8 +172,8 @@ class Manager {
172
172
  sendDataBroadcast = (data) => {
173
173
  this.sendMessage("text", data, "broadcast");
174
174
  };
175
- sendDataUpload = (filename, file) => {
176
- this.sendMessage("text", filename, "upload");
175
+ sendDataUpload = (fileName, file) => {
176
+ this.sendMessage("text", fileName, "upload");
177
177
  this.sendMessage("binary", file, "", 100);
178
178
  };
179
179
  sendDataDirect = (dataValue, clientId) => {
@@ -206,14 +206,14 @@ class Manager {
206
206
  });
207
207
  };
208
208
  receiveDataDownload = (callback) => {
209
- let filename = "";
209
+ let fileName = "";
210
210
  this.receiveData("download", (data) => {
211
211
  if (typeof data === "string") {
212
- filename = data;
212
+ fileName = data;
213
213
  }
214
214
  else {
215
- callback(data, filename);
216
- filename = "";
215
+ callback(data, fileName);
216
+ fileName = "";
217
217
  }
218
218
  });
219
219
  };
@@ -9,7 +9,7 @@ export interface IcallbackReceiveData<T> {
9
9
  (data: T): void;
10
10
  }
11
11
  export interface IcallbackReceiveDataDownload {
12
- (data: DataView, filename: string): void;
12
+ (data: DataView, fileName: string): void;
13
13
  }
14
14
  export interface Imessage {
15
15
  tag: string;
@@ -23,7 +23,7 @@ export default class Manager {
23
23
  clientIdList: () => string[];
24
24
  sendMessage: (mode: string, data: model.TsendData, tag: string | undefined, clientId: string, timeout?: number) => void;
25
25
  sendDataBroadcast: (data: model.TsendData, excludeClientId?: string) => void;
26
- sendDataDownload: (filename: string, file: Buffer, clientId: string) => void;
26
+ sendDataDownload: (fileName: string, file: Buffer, clientId: string) => void;
27
27
  receiveData: <T>(tag: string, callbackValue: model.IcallbackReceiveData<T>) => void;
28
28
  receiveDataUpload: (callback: model.IcallbackReceiveDataUpload) => void;
29
29
  }
@@ -347,8 +347,8 @@ class Manager {
347
347
  }
348
348
  }
349
349
  };
350
- sendDataDownload = (filename, file, clientId) => {
351
- this.sendMessage("text", filename, "download", clientId);
350
+ sendDataDownload = (fileName, file, clientId) => {
351
+ this.sendMessage("text", fileName, "download", clientId);
352
352
  this.sendMessage("binary", file, "", clientId, 100);
353
353
  };
354
354
  receiveData = (tag, callbackValue) => {
@@ -370,14 +370,14 @@ class Manager {
370
370
  });
371
371
  };
372
372
  receiveDataUpload = (callback) => {
373
- let filename = "";
373
+ let fileName = "";
374
374
  this.receiveData("upload", (data, clientId) => {
375
375
  if (typeof data === "string") {
376
- filename = data;
376
+ fileName = data;
377
377
  }
378
378
  else {
379
- callback(data, filename, clientId);
380
- filename = "";
379
+ callback(data, fileName, clientId);
380
+ fileName = "";
381
381
  }
382
382
  });
383
383
  };
@@ -25,7 +25,7 @@ export interface IcallbackReceiveData<T> {
25
25
  (data: T, clientId: string): void;
26
26
  }
27
27
  export interface IcallbackReceiveDataUpload {
28
- (dataList: Buffer[], filename: string, clientId: string): void;
28
+ (dataList: Buffer[], fileName: string, clientId: string): void;
29
29
  }
30
30
  export interface Imessage {
31
31
  tag: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimo/websocket",
3
- "version": "1.5.49",
3
+ "version": "1.5.50",
4
4
  "description": "Websocket (server/client). Light, fast and secure.",
5
5
  "author": "cimo",
6
6
  "license": "MIT",