Faster WebSocket reconnects
This commit is contained in:
parent
3cac4a19e1
commit
17e6ec468e
25 changed files with 940 additions and 677 deletions
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { w3cwebsocket } from 'websocket';
|
||||
|
||||
type ModifiedEventSource = Omit<EventSource, 'onerror'>;
|
||||
|
||||
declare class ModifiedWebSocket
|
||||
extends w3cwebsocket
|
||||
implements ModifiedEventSource {
|
||||
withCredentials: boolean;
|
||||
|
||||
addEventListener: EventSource['addEventListener'];
|
||||
|
||||
removeEventListener: EventSource['removeEventListener'];
|
||||
|
||||
dispatchEvent: EventSource['dispatchEvent'];
|
||||
}
|
||||
|
||||
export type WebSocket = ModifiedWebSocket;
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const WebSocket = w3cwebsocket as typeof ModifiedWebSocket;
|
Loading…
Add table
Add a link
Reference in a new issue