feat(unstable): WebTransport (#27431)

Initial implementation of WebTransport client and server!

This is very unstable because the interface should eventually shift to
use hyper (h3 is on the [2025
roadmap](https://hyper.rs/contrib/roadmap/)) instead of manually messing
with the the protocol, which will enable integration with
Deno.serveHttp/etc and allow WebTransport over h2. This will also let us
expose multiplexing.

WebTransport stats will be a followup due to their complexity.

Fixes: https://github.com/denoland/deno/issues/9017
This commit is contained in:
snek 2025-01-29 15:39:12 +01:00 committed by GitHub
parent 7528c7909c
commit 0098fddb10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1945 additions and 13 deletions

View file

@ -851,5 +851,17 @@ declare namespace Deno {
options: ConnectQuicOptions<ZRTT>,
): ZRTT extends true ? (QuicConn | Promise<QuicConn>) : Promise<QuicConn>;
/**
* **UNSTABLE**: New API, yet to be vetted.
*
* Upgrade a QUIC connection into a WebTransport instance.
*
* @category Network
* @experimental
*/
export function upgradeWebTransport(
conn: QuicConn,
): Promise<WebTransport & { url: string }>;
export {}; // only export exports
}