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

    Interface WireStream

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

    A wire stream is a bidirectional transport without global message ordering guarantees. Sequenced NodeFragment streams provide application-level ordering 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