UNPKG

@novo-learning/novo-sdk

Version:

SDK for the Novolanguage Speech Analysis API

24 lines (23 loc) 884 B
import { ConnectionQuality } from '../entities/connection-quality'; import { ConnectionState } from '../entities/connection-state'; import { EventBus } from '../event-bus'; import { MessageQueue } from './message-queue'; export declare class ConnectionMonitor { private readonly eventBus; private readonly messageQueue; private readonly websocket; private pollingTimer?; private pollingPromise?; private internalConnQuality; private internalState; constructor(eventBus: EventBus, messageQueue: MessageQueue, websocket: WebSocket); get connectionQuality(): ConnectionQuality; set connectionQuality(quality: ConnectionQuality); get state(): ConnectionState; private set state(value); checkConnection(force?: boolean): Promise<void>; private lostConnection; private getConnectionQuality; private ping; close(): void; }