import { WebSocketConfig } from "./websocket";
import { WebSocketCallbacks } from "./websocket";
import { WebSocketClient } from "./websocket";
/**
 * WebSocket连接池
 * 用于管理WebSocket连接
 * 单例模式
 */
export declare class WebSocketConnectionPool {
    private static instance;
    private connections;
    private connectionConfigs;
    private pendingConnections;
    private constructor();
    static getInstance(): WebSocketConnectionPool;
    /**
     * 生成连接的唯一标识
     */
    private generateConnectionKey;
    /**
     * 获取或创建连接
     */
    getOrCreateConnection(config: WebSocketConfig, callbacks?: WebSocketCallbacks): Promise<WebSocketClient>;
    /**
     * 检查连接是否存在
     */
    hasConnection(config: WebSocketConfig): boolean;
    /**
     * 获取所有连接
     */
    getAllConnections(): Map<string, WebSocketClient>;
    /**
     * 关闭指定连接
     */
    closeConnection(config: WebSocketConfig): boolean;
    /**
     * 关闭所有连接
     */
    closeAllConnections(): boolean;
}
/**
 * 连接池管理函数
 */
export declare const WebSocketConnectionPoolManager: {
    /**
     * 获取连接池实例
     */
    getInstance: () => WebSocketConnectionPool;
    /**
     * 检查是否存在指定配置的连接
     */
    hasConnection: (config: WebSocketConfig) => boolean;
    /**
     * 关闭指定配置的连接
     */
    closeConnection: (config: WebSocketConfig) => boolean;
    /**
     * 关闭所有连接
     */
    closeAllConnections: () => void;
    /**
     * 关闭并移除key中uuid为uuid的连接
     * @param uuid 连接的唯一标识
     */
    removeConnectionByUUID: (uuid: string) => void;
    /**
     * 强制清理所有连接（用于调试和紧急清理）
     */
    forceCleanAll: () => void;
};
