send_data for arbitrary buffer type
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 890
- Forks
- 136
- Avg merge
- 14d 20h
- Merged PRs (30d)
- 2
Description
The buffer type should not be fixed for a connection or stream. It should be a generic parameter of the send_data function, so that each send_data call on the same stream can have a different buffer type.
This is because when h3 is eventually integrated with hyper, hyper will need to send whatever buffer type the response HttpBody has.
The main issue here is tracking the write progress of an asynchronous write operation. With the current API, it is guaranteed that multiple writes can not be running simultaneously, which would result in them being garbled together.
quinn itself uses the following function signature:
pub fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a> {
The returned Write struct is a future that contains a mutable borrow of the stream.
I don't know if it would be possible to do something similar with the h3::quic traits.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the send_data API and the h3::quic traits, then compare their write behavior with the quinn write signature shown in the issue. Determine how asynchronous write progress and exclusive stream access should be represented when buffer types vary per call. Done means the API supports the required buffer flexibility without allowing concurrent writes to be garbled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100