hyperium / hyperium/h3

No WebTransport session-close receive or send API

Open
#349 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-h3-webtransport
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 CloseWebTransportSession capsule,
  • send a CloseWebTransportSession capsule,
  • 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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.