Expand description
The long-lived bridge server.
A WebSocket plane the browser connects to and an HTTP control plane the
operator drives, joined by an id-keyed correlator.
A request flows: control plane (authenticated) → assign id + register a
oneshot waiter → serialise a Command frame → WebSocket → browser
fetch() → BrowserReply frame → correlator resolves the waiter by id
→ control plane returns the HTTP response.
Structs§
- Bridge
Config - Resolved runtime configuration for a bridge instance.
- Bridge
Server - A running bridge instance: both loopback-TCP planes bound and serving, with
a
CancellationTokenfor graceful shutdown.
Constants§
- DEFAULT_
CONTROL_ PORT - Default HTTP control-plane port.
- DEFAULT_
MAX_ BODY_ BYTES - Default maximum browser response body size (8 MiB).
- DEFAULT_
MAX_ CONCURRENT - Default maximum concurrent in-flight requests.
- DEFAULT_
TIMEOUT_ SECS - Default per-request timeout, in seconds.
- DEFAULT_
WS_ PORT - Default WebSocket-plane port.
Functions§
- run
- Binds both planes (fail-closed) and serves until the process is stopped.