No WebTransport session-close receive or send API
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 890
- Forks
- 136
- Avg merge
- 14d 20h
- Merged PRs (30d)
- 2
Description
Version
h3-webtransport 0.1.2
Platform
Linux desktop 7.1.7 NixOS x86_64 GNU/Linux
Summary
h3-webtransport doesn't expose a session-close receive or send API, preventing users from reporting a browser's WebTransport close code/reason or sending its own close reason during a graceful shutdown
Code Sample
Peer pseudocode:
let mut connect = establish_extended_connect().await?;
connect
.send_capsule(CloseWebTransportSession {
code: 42,
reason: "client shutdown".into(),
})
.await?;
connect.finish().await?;
Expected Behavior
The session API should expose both directions of the WebTransport session lifecycle, for example:
session.closed().await -> SessionClose
session.close(code, reason).await
The implementation should parse and emit the applicable capsule on the CONNECT stream while continuing to drive ordinary session streams.
Actual Behavior
WebTransportSession privately retains the CONNECT request stream as connect_stream, but does not poll its body for capsules and exposes no method to:
- receive a peer
CloseWebTransportSessioncapsule, - send a
CloseWebTransportSessioncapsule, - close with a WebTransport close code and reason, or
- await session closure independently of whole HTTP/3 connection closure.
Consequently, graceful server shutdown can only drain RPCs and close the underlying HTTP/3 connection. A peer session-close capsule is not surfaced to application code through accept_bi() or another session future.
Suggested upstream fix
Add a CONNECT-stream capsule driver owned by WebTransportSession, plus explicit close and closed APIs. Session close must remain independent of ordinary HTTP/3 connection shutdown and should preserve the close code and reason.
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 with WebTransportSession and its private connect_stream, then trace how the CONNECT stream and session streams are driven. Define how CloseWebTransportSession capsules are received and emitted, and ensure the close and closed APIs preserve the code and reason while remaining independent of whole HTTP/3 connection shutdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100