Function protocolStream

  • Consume an elevated streaming protocol method from app code.

    for await (const ev of protocolStream('protocol-contribute', 'run', [opts])) …

    Pass signal to abort the stream (and the host's in-flight work) mid-flight.

    Type Parameters

    • T = unknown
    • R = unknown

    Parameters

    • protocolName: string
    • method: string
    • params: unknown[]
    • Optionalsignal: AbortSignal
    • Optionalopts: BoundedCallOptions & { idleTimeoutMs?: number }

    Returns AsyncGenerator<T, R, void>