fix(stream): send key edges on the control stream - #40
Merged
Merged
Conversation
A key press or release was one datagram, and a lost release held the key on the host until its next edge. A host that advertises HOST_CAP2_INPUT_EDGES (punktfunk #1595) reads key edges off the control stream, where the transport resends what the network drops, so the browser sends KeyDown and KeyUp there through the writer it already has. Motion, scroll and pads stay datagrams; an older host gets every event as a datagram, as before. The punktfunk-core pin moves to the commit that carries the message. That core no longer exports reanchor::index_gap, so the four-line gap helper lives beside its only caller now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A key press or release is one datagram, and a lost release holds the key on the host until its next edge. The native clients fixed this in punktfunk #1595: a host that advertises
HOST_CAP2_INPUT_EDGESreads key edges off the control stream, where QUIC resends what the network drops. The browser client sends its own datagrams, so it needs the same routing.Change
sessionkeepsWelcome::host_caps2besidehost_capsand exposes its control writer toinput.input::sendsendsKeyDown/KeyUpasInputEdgeon the control stream when the host has the bit; everything else, and everything toward an older host, stays a datagram.punktfunk-corepinc6691fc1f→25506f01b(the #1595 merge), which carriesInputEdgeand the capability bit. That core no longer exportsreanchor::index_gap(folded into aquic-only tracker), so the four-line gap helper now lives inrecovery.rsbeside its only caller; the existing wrap and straggler tests cover it.Tests
Client-web's Rust CI job run locally on this tree:
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo clippy --target wasm32-unknown-emscripten -- -D warnings,cargo test. Not on glass: a browser session against a host built from punktfunk main after #1595 is owed, with thenft20 % loss recipe from #1543.