6 releases (3 breaking)

0.6.1 Mar 31, 2024
0.6.0 Oct 12, 2023
0.5.4 Sep 26, 2023
0.4.0 Jul 19, 2023
0.2.1 Jul 17, 2023

#6 in #web-transport

Download history 74/week @ 2023-12-23 28/week @ 2023-12-30 58/week @ 2024-01-06 38/week @ 2024-01-13 24/week @ 2024-01-20 25/week @ 2024-01-27 31/week @ 2024-02-03 44/week @ 2024-02-10 40/week @ 2024-02-17 68/week @ 2024-02-24 68/week @ 2024-03-02 69/week @ 2024-03-09 60/week @ 2024-03-16 57/week @ 2024-03-23 203/week @ 2024-03-30 42/week @ 2024-04-06

376 downloads per month
Used in webtransport-quinn

MIT license

55KB
1.5K SLoC

WebTransport

WebTransport is a protocol for client-server communication over QUIC. It's available in the browser as an alternative to HTTP and WebSockets.

WebTransport is layered on top of HTTP/3 which is then layered on top of QUIC. This library hides that detail and tries to expose only the QUIC API, delegating as much as possible to the Quinn API.

QUIC provides two primary APIs:

Streams

QUIC streams are ordered, reliable, flow-controlled, and optionally bidirectional. Both endpoints can create and close streams (including an error code) with no overhead. You can think of them as TCP connections, but shared over a single QUIC connection.

Datagrams

QUIC datagrams are unordered, unreliable, and not flow-controlled. Both endpoints can send datagrams below the MTU size (~1.2kb minimum) and they might arrive out of order or not at all. They are basically UDP packets, except they are encrypted and congestion controlled.

webtransport-quinn

See webtransport-quinn for an implementation that mirrors the Quinn API.

Dependencies

~2.1–3MB
~87K SLoC