xmpp-httpx - v0.11.0
    Preparing search index...

    Interface BodyTransport

    A handshake-driven body-transport mechanism. The built-ins (inline, chunkedBase64, ibb) are wired directly in client/server for simplicity; sipub and jingle register here.

    interface BodyTransport {
        kind: string;
        accepts(accept: StreamAcceptFlags): boolean;
        offer(peer: string, body: BodyOffer): DataDescriptor;
        receive(
            peer: string,
            descriptor: DataDescriptor,
            options?: { ourJid?: string; timeoutMs?: number },
        ): ReadableStream<Uint8Array<ArrayBufferLike>>;
        release(): void;
    }

    Implemented by

    Index
    kind: string

    DataDescriptor kind this transport produces/consumes.

    • Receive side: a lazy stream that drives the handshake on first read.

      Parameters

      • peer: string
      • descriptor: DataDescriptor
      • Optionaloptions: { ourJid?: string; timeoutMs?: number }

      Returns ReadableStream<Uint8Array<ArrayBufferLike>>