export declare enum WSClientState { Connecting = 0, Connected = 1, Disconnecting = 2, Disconnected = 3 } export interface WSClientSettings { reconnectInterval?: number; maxReconnectInterval?: number; reconnectDecay?: number; connectTimeout?: number; maxReconnectAttempts?: number | undefined; } export declare class WSClient { private static defaultSettings; private _settings; private _state; private _url; private _protocols; private _ws; private _attempts; private _forceClose; onConnect: () => void; onConnecting: (code: number) => void; onDisconnect: (code: number) => void; onMessage: (data: any) => void; onError: (event: Event) => void; get state(): WSClientState; get url(): string; get protocols(): string | string[]; get reconnectAttemps(): number; constructor(settings?: WSClientSettings); private tryOpen; open(url: string, protocols?: string | string[]): void; close(): void; send(data: any): void; }