sync library
Server–client mode of crdt_socket_sync on a Dart Frog backend.
The HTTP server stays Dart Frog's; each upgraded socket is handed to a DocumentSessionHost, which holds the documents and takes the aligned snapshots.
Classes
- CRDTServerRegistry
- Class managing the CRDT document registry on the server.
- DocumentSessionHost
- CRDT-aware session host: the server half of the document sync protocol, with no transport of its own.
-
SessionHostServer<
S extends ClientSession> -
A
CRDTSocketServerthat owns sessions, not a socket. - WebSocketChannelConnection
-
TransportConnectionover aWebSocketChannel.
Enums
- SessionHostState
- The lifecycle of a SessionHostServer.
Functions
-
crdtSyncHostProvider(
DocumentSessionHost host) → Middleware -
Middlewarethat gives the routes below ithost. -
crdtSyncWebSocketHandler(
DocumentSessionHost host, {Iterable< String> ? protocols, Iterable<String> ? allowedOrigins, Duration? pingInterval}) → Handler -
A Dart Frog
Handlerthat upgrades the request and hands the socket tohost, the CRDT-aware (DocumentSessionHost) side of the protocol.