/// <reference types="node" />
import { EventEmitter } from "events";
declare class EventCenter extends EventEmitter {
}
declare class Client {
    url: string;
    ws: WebSocket;
    isReconnecting: boolean;
    isCustomClose: boolean;
    timerID: any;
    pingTimer: any;
    connectingTimeoutTimer: any;
    timerHeartbeat: any;
    errorStack: any[];
    eventCenter: EventCenter;
    token: string;
    readonly pingInterval: number;
    readonly timeoutInterval: number;
    readonly connectingTimeout: number;
    constructor(url: string, token: string);
    updateToken(token: string): void;
    init(): Promise<void>;
    createWs(): void;
    heartbeat(): void;
    sendPing(): void;
    onopen(): void;
    ping(): void;
    onPing(): void;
    logout(deleted?: boolean, execDelegate401?: boolean): void;
    onerror(): void;
    onclose(): void;
    onReceiveMessage(dataStr: string): void;
    onmessage(): void;
    reconnection(now?: boolean): void;
    terminate(): void;
    send(message: any): void;
    close(): void;
    start(): void;
    subscribe(eName: string, handler: (...args: any[]) => void): void;
    unSubscribe(eName: string, handler: (...args: any[]) => void): void;
    reset(): void;
}
declare const WSClient: Client;
export default WSClient;
