relay library

Relay mode of crdt_socket_sync on a Dart Frog backend.

The HTTP server stays Dart Frog's; each upgraded socket is handed to a RelaySessionHost, which rebroadcasts opaque change blobs per room and never interprets CRDT data.

Classes

RelayCompactionCoordinator
Decides when the relay asks a client to upload a snapshot to compact a room log.
RelaySessionHost
Relay session host: the server half of the relay protocol, with no transport of its own.
RelayStore
Pluggable, CRDT-agnostic persistence for relay rooms.
SessionHostServer<S extends ClientSession>
A CRDTSocketServer that owns sessions, not a socket.
WebSocketChannelConnection
TransportConnection over a WebSocketChannel.

Enums

SessionHostState
The lifecycle of a SessionHostServer.

Functions

crdtRelayHostProvider(RelaySessionHost host) → Middleware
Middleware that gives the routes below it the relay host.
crdtRelayWebSocketHandler(RelaySessionHost host, {Iterable<String>? protocols, Iterable<String>? allowedOrigins, Duration? pingInterval}) → Handler
A Dart Frog Handler that upgrades the request and hands the socket to host, the relay (RelaySessionHost) side of the protocol.