import { RTCMessageClient } from "./message-client"; import { RTCConnectionArg } from "./rtc.type"; declare const RTCMessageService_base: new (args_0: [connection?: RTCConnectionArg, channelName?: string | undefined, channelId?: number | undefined], args_1: [connection?: RTCConnectionArg, channelName?: string | undefined, channelId?: number | undefined]) => { readonly created: Promise; readonly ready: Promise; initialize: (connection?: RTCConnectionArg, channelId?: number) => void; terminate: () => void; } & RTCMessageClient; /** * Bidirectional message service for WebRTC DataChannel communication. * * Combines {@link RTCMessageHost} and {@link RTCMessageClient} via mixin, * enabling both `@Listen` and `@Request` decorators on the same class. * * @example * ```typescript * class GamePeer extends RTCMessageService { * @Request('move') * sendMove(pos: [number, number]): Observable { return null!; } * * @Listen('move') * handleMove({ data }: { data: [number, number] }): Observable { * return of(applyMove(data)); * } * } * * const peer = new GamePeer(peerConnection, 'game-events'); * ``` */ export declare class RTCMessageService extends RTCMessageService_base { /** * @param connection - RTCPeerConnection instance, promise, or factory function. * @param channelName - Name for the negotiated data channel. * @param channelId - Explicit negotiated channel ID. Overrides the hash-derived default. */ constructor(connection?: RTCConnectionArg, channelName?: string, channelId?: number); initialize: (connection: RTCConnectionArg, channelId?: number) => void; } export {};