/** @packageDocumentation * @module IpcSocket */ import { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from "./IpcSocket"; /** @internal */ export declare abstract class IpcWebSocketTransport { abstract send(message: IpcWebSocketMessage): void; } /** @internal */ export declare enum IpcWebSocketMessageType { Send = 0, Push = 1, Invoke = 2, Response = 3 } /** @internal */ export interface IpcWebSocketMessage { type: IpcWebSocketMessageType; request?: number; response?: number; channel: string; method?: string; data?: any[]; } /** @internal */ export declare abstract class IpcWebSocket implements IpcSocket { static transport: IpcWebSocketTransport; static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void>; protected _channels: Map>; constructor(); abstract send(channel: string, ...data: any[]): void; addListener(channel: string, listener: IpcListener): RemoveFunction; removeListener(channel: string, listener: IpcListener): void; private broadcast; } /** @internal */ export declare class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend { private _nextRequest; private _pendingRequests; constructor(); send(channel: string, ...data: any[]): void; invoke(channel: string, methodName: string, ...args: any[]): Promise; private dispatch; } /** @internal */ export declare class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend { private _handlers; constructor(); send(channel: string, ...data: any[]): void; handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise): RemoveFunction; private dispatch; } //# sourceMappingURL=IpcWebSocket.d.ts.map