muxws
v0.3.1
Published
Multiplexed, cancellable, bidirectional streams over one WebSocket
Readme
muxws
HTTP/2 and HTTP/3 stream semantics over a WebSocket. Many independent, cancellable, bidirectional streams on
one socket, either end able to open one - the model HTTP/2 and HTTP/3 already settled, without needing
QUIC or an HTTP/3 stack. The wire format is the product; Python and TypeScript are the two ports that
exist today, and SPEC.md plus
conformance/ are what a third is
written from.
The mimicry is of semantics, not transport: one TCP connection means one global message order and no per-stream loss recovery - the rationale says what is and is not copied, and the comparison accounts for it frame by frame. muxws is not a router, not a serializer of domain objects, not an authentication mechanism, not a durable store and not an RPC framework.
Install
pip install muxws # extras: [starlette], [websockets], [msgpack]
npm install muxws # optional peers: ws, @msgpack/msgpackDocumentation
docs.velis.si/muxws is the manual - or build it yourself with
npm run docs:dev.
| | |
|---|---|
| Server and client in three files | Getting started |
| Every public symbol, both languages | API reference |
| The normative rules, and the fixtures a third port is written from | SPEC.md, conformance/ |
Status
Alpha - the first releases. Two versions that move independently: the wire is already at its
first generation and frozen there (muxws.v1.<codec> is the subprotocol, and v1 stays until a
breaking change earns a new one), while the package carries a leading zero because none of this has
been through a real deployment yet. 1.0 is what the first confirmed production use earns. Python
package muxws (PyPI); npm package muxws, browser entry plus the muxws/node and muxws/msgpack
subpaths.
Licence
MIT. Copyright © 2025 Jure Erznožnik.
