import { UnixDomainSocket } from "../../ipc/uds"; type WebSocketOpts = { block_size_kb: number; compression: boolean; max_message_size_kb: number; ping_timeout: number; port: number; rate_limit: number; read_timeout: number; send_timeout: number; thread_limit: number; }; type WebSocketCtx = Record; type WebSocketBytes = Buffer; declare class WebSocketStream { addr: string; cb_send: (topic: string, args: any[], bytes: Buffer) => Promise; constructor(addr: string); close(): Promise; on_send(cb: (topic: string, args: any[], bytes: Buffer) => Promise): void; push(payload: any, bytes: Buffer): Promise; push_bytes(bytes: Buffer): Promise; push_json(json: any): Promise; set_compression(compression: null | string): Promise; } type WebSocketHandler = (ctx: WebSocketCtx, bytes: WebSocketBytes, stream: WebSocketStream) => Promise; declare class WebSocketServer { id: number; opts: WebSocketOpts; handlers: { [key: string]: WebSocketHandler; }; socket_path: string; uds: UnixDomainSocket; constructor(opts: WebSocketOpts); logger(cb: any): void; on(path: string, cb: WebSocketHandler): void; start(): Promise; stop(): Promise; } export type { WebSocketOpts, WebSocketCtx, WebSocketBytes }; export { WebSocketServer, WebSocketStream }; //# sourceMappingURL=index.d.ts.map