1 import type { BroadcastSource } from '../Bridge/BroadcastSource'
2 import type { WebsocketCallbacks } from './WebsocketCallbacks'
4 export interface WebsocketConnectionInterface {
5 callbacks: WebsocketCallbacks
6 connect(abortSignal?: () => boolean): Promise<void>
8 disconnect(code: number): void
9 markAsReadyToAcceptMessages(): void
10 canBroadcastMessages(): boolean
11 isConnected(): boolean
12 broadcastMessage(data: Uint8Array, source: BroadcastSource): Promise<void>