Skip to content

Maintaining and cleaning up state for streams #1507

@tegefaulkes

Description

@tegefaulkes

We are building a JS binding for the quiche library, and we have hit a problem with maintaining state alongside Quiche's streams.

For each quiche connection we keep track of existing quiche stream. For each of these streams we maintain JS readable and writable streams corresponding to the sending and receiving side of the quiche stream.

When the quiche streams receiving or sending ends, either via a fin frame or some error, We need to end our JS streams, clean up any state and dispatch end events for the stream.

My questions are as follows.

  1. How can we know when a stream has ended?
  2. If a stream ended with an error and not a fin frame, will it show up in the connection writable and readable iterators?
  3. If not, is there a good way to know when these streams have ended without checking every existing stream after we do a connection send or recv loop?

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