@moq/qmux
v0.0.6
Published
QMux protocol (draft-ietf-quic-qmux-00) over WebSockets
Downloads
11,379
Maintainers
Readme
@moq/qmux
A WebTransport polyfill for browsers, using WebSockets as the underlying transport with QMux (draft-ietf-quic-qmux-00) framing.
QMux brings QUIC's multiplexed streams and flow control to reliable, ordered byte-stream transports like WebSockets. This allows WebTransport applications to seamlessly fall back when QUIC/UDP is blocked by network middleboxes.
Install
npm install @moq/qmuxUsage
Use as a drop-in WebTransport replacement:
import Session from "@moq/qmux"
const transport = new Session("https://example.com/endpoint")
await transport.ready
const stream = await transport.createBidirectionalStream()Polyfill
Install as a global WebTransport polyfill:
import { install } from "@moq/qmux"
// Only installs if native WebTransport is unavailable
install()
// Now use the standard WebTransport API
const transport = new WebTransport("https://example.com/endpoint")License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
