cloudflare / cloudflare/quiche

Exposing the number of bytes available to read

Open
#2,239 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
11.8k
Forks
1.1k
Avg merge
3d 7h
Merged PRs (30d)
16

Description

There's currently no way to determine how many bytes can be returned by `stream_recv`.

I'm currently writing an async API on top of quiche and unfortunately, that means allocating on the heap via `Vec` or `BytesMut`. With no way of knowing the size upfront, I either have to over-allocate or perform an additional copy (using a temporary buffer to learn the size).

Something like `stream_capacity` but in the reverse direction would be great. `stream_buffered` maybe?

Contributor guide

Open the contributing guide

Research direction

Start by locating the `stream_recv` and `stream_capacity` APIs in quiche and compare how they expose readable and writable stream state. Determine the intended meaning of a reverse-capacity method for async callers using `Vec` or `BytesMut`; done means the API reports the available readable byte count without requiring a temporary read or extra copy, with corresponding tests if the existing API area has them.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.