quiche icon indicating copy to clipboard operation
quiche copied to clipboard

Maintaining and cleaning up state for streams

Open tegefaulkes opened this issue 2 years ago • 0 comments

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?

tegefaulkes avatar May 09 '23 06:05 tegefaulkes