cloudflare / cloudflare/quiche
stream_id helpers
- Dominant language
- Rust
- Stars
- 11.8k
- Forks
- 1.1k
- Avg merge
- 21h 9m
- Merged PRs (30d)
- 6
Description
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:
```rs
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.
Contributor guide
Assessment
This issue has not been assessed yet.