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
CRDTSocketServerthat owns sessions, not a socket. - WebSocketChannelConnection
-
TransportConnectionover aWebSocketChannel.
Enums
- SessionHostState
- The lifecycle of a SessionHostServer.
Functions
-
crdtRelayHostProvider(
RelaySessionHost host) → Middleware -
Middlewarethat gives the routes below it the relayhost. -
crdtRelayWebSocketHandler(
RelaySessionHost host, {Iterable< String> ? protocols, Iterable<String> ? allowedOrigins, Duration? pingInterval}) → Handler -
A Dart Frog
Handlerthat upgrades the request and hands the socket tohost, the relay (RelaySessionHost) side of the protocol.