Expose per-stream acknowledged offset

Open
#808 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

Research direction

No files or tests are named. Start by locating the stream API and the QUIC acknowledgement handling, then determine how a per-stream wait can observe acknowledged offsets. Done means an API such as ack_offset(offset).await is available and resolves with a Result when the requested byte offset has been acknowledged.

Written by the indexing model from the issue text.

Description

Hey guys, I'd like some API to learn about the ACK offset of a stream (including an .await) to learn when it changes.

The use-case is stats, determining if the peer is starved. In the case of MoQ, we can use this cursor as a rough estimate as to what the user sees because we know the timestamps of each frame. We can't use it as a definitive "we know the application has processed this offset" of course, because it's only a QUIC level ACK.

It's also just useful for knowing when headers have been received by the peer, so you can delay sending RESET_STREAM. Like a ghetto RESET_AT message without the extension.

So something like stream.ack_offset(1234).await -> Result<usize, Error> would block until at least byte 1234 has been acknowledged.

Dominant language
Rust
Stars
454
Forks
98
Avg merge
2d 8h
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from n0-computer/noq

All issues in n0-computer/noq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.