quiche icon indicating copy to clipboard operation
quiche copied to clipboard

stream_id helpers

Open kixelated opened this issue 2 months ago • 0 comments

Each time I use Quiche, I find myself googling RFC9000 for information about the which stream IDs to use. It's not obvious to the outsider that server/client/bi/uni stream IDs are different, nor that they should be incremented by 4 each time.

Would a StreamId helper type be useful? I understand that changing the existing API to use StreamId instead of u64 might be too much of a change.

But maybe just a stream_id module with methods like:

fn is_uni(u64) -> bool
fn is_server(u64) -> bool
fn increment(&mut u64) -> u64
const SERVER_UNI = 3u64
// etc

I end up reimplementing this each time I use Quiche, and I'm sure others do too.

kixelated avatar Nov 07 '25 23:11 kixelated