connect-bidi-web
    Preparing search index...

    Interface HandleMuxedBidiSocketOptions

    interface HandleMuxedBidiSocketOptions {
        contextValues?: ContextValues;
        idleTimeoutMs?: number;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index
    contextValues?: ContextValues

    Context values made available to the handler implementation.

    idleTimeoutMs?: number

    Tears the connection down after this many milliseconds without an incoming frame: in-flight RPCs are aborted and the socket is closed.

    Recommended on pay-per-use runtimes such as Cloudflare Workers, where an idle connection otherwise pins a live invocation until the platform reaps it (and logs the request as hung). Streams that are actively receiving are kept alive by their own traffic; only a fully quiet peer is disconnected. Well-behaved clients dial a fresh connection on their next RPC.

    signal?: AbortSignal

    Aborts the in-flight RPC, for example to support graceful server shutdown. Aborting this signal does not close the socket; callers that want the socket closed too should also call close() themselves, or rely on the caller of handleBidiSocket to do so once the returned promise settles.