A11 TypeScript API - v0.2.1
    Preparing search index...

    Interface WireStream

    Message-oriented transport shared by sessions, actions, and node mirroring.

    A wire stream is bidirectional and deliberately does not promise global message ordering. Ordered application data travels as sequenced NodeFragments above this layer. The lifecycle does promise a closure barrier: messages accepted before a half-close are observed before the peer is told that direction has ended.

    Call start on the initiating endpoint or accept on the responding endpoint exactly once. Finish normally with halfClose and drainOutgoingMessages; use abort for a failed exchange.

    interface WireStream {
        abort(status: Status): Status;
        accept(onMessage?: OnWireMessage, onDone?: OnWireDone): Promise<Status>;
        drainOutgoingMessages(): Promise<Status>;
        getDeadline(): number | null;
        getId(): string;
        getImpl(): unknown;
        getStatus(): Status;
        getTrailers(): ByteMap | null;
        halfClose(trailers?: ByteMapInput): Status;
        send(message: WireMessage): Status;
        setDeadline(deadline?: WireDeadline): Status;
        start(onMessage?: OnWireMessage, onDone?: OnWireDone): Promise<Status>;
        wait(): Promise<Status>;
    }

    Implemented by

    Index
    • Return the normalized epoch deadline, or null when disabled.

      Returns number | null

    • Return the transport-assigned stream identifier.

      Returns string

    • Return an advanced transport handle, when the implementation has one.

      Returns unknown