@vkontakte/calls-sdk 2.8.12-dev.26c45af4.0 → 2.8.12-dev.773596bc.0

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.
@@ -1,31 +1,32 @@
1
1
  import { WebTransportOptions } from '@fails-components/webtransport';
2
+ import { DebugLogger } from '../static/Debug';
2
3
  declare class WebTransportEventual {
4
+ static isBrowserSupported(): boolean;
5
+ onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
6
+ onmessage: ((this: WebTransportEventual, ev: MessageEvent) => any) | null;
7
+ onerror: ((this: WebTransportEventual, ev: Event) => any) | null;
8
+ onclose: ((this: WebTransportEventual, ev: CloseEvent) => any) | null;
9
+ readyState: number;
3
10
  private webTransport;
4
- private stream;
5
11
  private writer;
6
- private reader;
7
12
  private readonly url;
8
13
  private readonly options;
9
14
  private readonly compression;
10
- private closeRequested;
11
- private closeEventEmitted;
12
15
  private encoder;
13
16
  private decoder;
14
- onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
15
- onmessage: ((this: WebTransportEventual, ev: MessageEvent) => any) | null;
16
- onerror: ((this: WebTransportEventual, ev: Event) => any) | null;
17
- onclose: ((this: WebTransportEventual, ev: CloseEvent) => any) | null;
18
- readyState: number;
19
- constructor(url: string, options?: WebTransportOptions);
17
+ private readonly _debug;
18
+ constructor(url: string, options?: WebTransportOptions, debug?: DebugLogger);
19
+ send(data: string): Promise<void>;
20
+ close(code?: number, reason?: string): void;
20
21
  private getCompressionTypeFromUrl;
21
22
  private connect;
22
- private readChunks;
23
+ private observeClosed;
23
24
  private readLoop;
24
- send(data: string): Promise<void>;
25
+ private fail;
26
+ private handleStreamError;
27
+ private requestNativeClose;
28
+ private finishClose;
29
+ private emitEvent;
25
30
  private createErrorEvent;
26
- close(code?: number, reason?: string): void;
27
- private closeConnectedTransport;
28
- private emitClose;
29
- static isBrowserSupported(): boolean;
30
31
  }
31
32
  export { WebTransportEventual as WebTransport };