1 |
|
2 |
|
3 |
|
4 | export class WebsocketClient extends Observable<string> {
|
5 | |
6 |
|
7 |
|
8 |
|
9 |
|
10 | constructor(url: string, { binaryType }?: {
|
11 | binaryType?: "arraybuffer" | "blob" | null | undefined;
|
12 | } | undefined);
|
13 | url: string;
|
14 | /**
|
15 | * @type {WebSocket?}
|
16 | */
|
17 | ws: WebSocket | null;
|
18 | binaryType: "arraybuffer" | "blob" | null;
|
19 | connected: boolean;
|
20 | connecting: boolean;
|
21 | unsuccessfulReconnects: number;
|
22 | lastMessageReceived: number;
|
23 | |
24 |
|
25 |
|
26 |
|
27 | shouldConnect: boolean;
|
28 | _checkInterval: NodeJS.Timer;
|
29 | |
30 |
|
31 |
|
32 | send(message: any): void;
|
33 | disconnect(): void;
|
34 | connect(): void;
|
35 | }
|
36 | import { Observable } from "./observable.js";
|
37 |
|
\ | No newline at end of file |