import { RpcPeer, RpcSerializer } from "../rpc"; export interface WebSocketConnectCallbacks { connect(e: Error, ws: WebSocketMethods): void; end(): void; error(e: Error): void; data(data: string | ArrayBufferLike): void; } export interface WebSocketConnect { (connection: WebSocketConnection, callbacks: WebSocketConnectCallbacks): void; } export interface WebSocketMethods { send(message: string | ArrayBufferLike): void; close(message: string): void; } export declare function createWebSocketClass(__websocketConnect: WebSocketConnect): any; export declare class WebSocketConnection implements WebSocketMethods { url: string; websocketMethods: WebSocketMethods; [RpcPeer.PROPERTY_PROXY_PROPERTIES]: any; [RpcPeer.PROPERTY_PROXY_ONEWAY_METHODS]: string[]; constructor(url: string, websocketMethods: WebSocketMethods); send(message: string | ArrayBufferLike): void; close(message: string): void; } export declare class WebSocketSerializer implements RpcSerializer { WebSocket: ReturnType; serialize(value: any, serializationContext?: any): void; deserialize(serialized: WebSocketConnection, serializationContext?: any): any; }