connect-bidi-web
    Preparing search index...

    Interface DuplexMessageStream

    A full-duplex, message-oriented connection carrying any number of multiplexed RPC streams -- in practice, a WebSocket. Unlike DuplexByteStream, message boundaries are significant: the readable must yield exactly one WebSocket message per chunk, and every chunk written to the writable must be sent as one WebSocket message, because each message begins with the stream ID it belongs to.

    interface DuplexMessageStream {
        close?: (code?: number, reason?: string) => void;
        readable: ReadableStream<Uint8Array<ArrayBufferLike>>;
        writable: WritableStream<Uint8Array<ArrayBufferLike>>;
    }
    Index
    close?: (code?: number, reason?: string) => void

    Close the underlying connection, optionally with a WebSocket close code and reason the peer can surface to its callers. Called once the connection's read side has ended and every in-flight RPC has finished, and eagerly (with a reason) when an idle timeout fires.

    readable: ReadableStream<Uint8Array<ArrayBufferLike>>
    writable: WritableStream<Uint8Array<ArrayBufferLike>>