UNPKG

websocket-pro-client

Version:

High-performance WebSocket client with auto-reconnect, heartbeat and priority messaging

12 lines (11 loc) 514 B
import { WebSocketClient } from "./WebSocketClient"; import { EventEmitter } from "./EventEmitter"; import { WebSocketConfig } from "../types"; export declare class WebSocketManager extends EventEmitter { private readonly config; private readonly clients; constructor(config: Required<WebSocketConfig>); connect(url: string, protocols?: string[]): WebSocketClient; closeAll(code?: number, reason?: string): void; getClient(url: string, protocols?: string[]): WebSocketClient | undefined; }