/// import { EventEmitter } from "events"; import { GusherOptions } from "./gusher"; import { Connection } from "./connection"; export declare enum State { INIT = "initialized", CONNECTED = "connected", ERROR = "error", CLOSED = "closed", CONNECTING = "connecting", DISCONNECTED = "disconnected" } export declare enum EmitterEvent { INIT = "initialized", CONNECTED = "connected", ERROR = "error", CLOSED = "closed", ATCLOSED = "@closed", CONNECTING = "connecting", DISCONNECTED = "disconnected", MSG = "message", RETRYMAX = "retryMax", RETRY = "retry" } export declare class ConnectionManager { key: string; options: GusherOptions; state: State; url: string; token: string; emitter: EventEmitter; reconnection: boolean; reconnectionDelay: number; retryMax: number; skipReconnect: boolean; retryNum: number; connectionStartTimestamp: number; retryTimer: number | null; connection: Connection; constructor(key: string, options: GusherOptions); retryIn(delay?: number): void; bind(event: string, callback?: any): this; unbind(event: string, callback?: any): ConnectionManager; unBindAll(...evt: any): void; connect(): void; disconnect(): void; updateState(newState: State, data?: any): void; send(event: string, data: any, channel?: string | undefined): false | void; }