import { JDBus } from "./bus"; import { JDClient } from "./client"; import { JDFrameBuffer } from "./packet"; /** * A client that bridges received and sent packets to a parent iframe. * @category JDOM */ export declare abstract class JDBridge extends JDClient { readonly infrastructure: boolean; private _bus; readonly bridgeId: string; packetSent: number; packetProcessed: number; currFrame: JDFrameBuffer; constructor(name: string, infrastructure?: boolean); get bus(): JDBus; set bus(newBus: JDBus); /** * Decodes and distributes a payload * @param data */ receiveFrameOrPacket(data: JDFrameBuffer, sender?: string): void; private handleSendFrame; /** * Sends packet data over the bridge * @param pkt */ protected abstract sendPacket(data: Uint8Array, sender: string): void; } declare class ProxyBridge extends JDBridge { readonly _sendPacket: (pkt: Uint8Array, sender: string) => void; constructor(_sendPacket: (pkt: Uint8Array, sender: string) => void); protected sendPacket(data: Uint8Array, sender: string): void; } export declare function createProxyBridge(sendPacket: (pkt: Uint8Array, sender: string) => void): ProxyBridge; export {}; //# sourceMappingURL=bridge.d.ts.map