Skip to content

quic: Documentation on async write on QuicStream #63305

@martenrichter

Description

@martenrichter

The current documentation says:

Writer — access stream.writer to push data incrementally. The writer exposes synchronous methods (writeSync(), writevSync(), endSync()) that return immediately, as well as async equivalents (write(), writev(), end()) that wait for drain when backpressured.

The async variant behaves currently like a push source in strict mode see https://github.com/WinterTC55/iter-streams/blob/main/docs/DESIGN.md#4-push-stream .
So it rejects if the flow control buffer is full.
Maybe this is the desired behavior.
I think this should be stated in documentation. Together with an example, how one want to check if the buffer is full.
Alternatively, a behavior, such as block, may be considered as an option.

That is only a tiny issue, I was wondering.

@jasnell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions