You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Limits**: 256 KiB max per message; large payloads are fragmented and reassembled.
53
53
-**Keepalive**: Text frames `"ping"`/`"pong"` are connection‑scoped and bypass the envelope.
54
54
-**%ELO**: DocUpdate payload is a container of encrypted records (DeltaSpan/Snapshot). Each record has a plaintext header (peer/version metadata, `keyId`, 12‑byte IV) and AES‑GCM ciphertext (`ct||tag`). Servers route/broadcast without decrypting.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
loro-protocol is a small, transport-agnostic syncing protocol for collaborative CRDT documents. This repo hosts the protocol implementation, a WebSocket client, and minimal servers for local testing or self‑hosting.
4
4
5
-
- Protocol: multiplex multiple rooms on one connection, 256 KiB max per message, large update fragmentation supported
5
+
- Protocol: multiplex multiple rooms on one connection, 256 KiB max per message, large update fragmentation supported, positive/negative delivery via `Ack`, room eviction via `RoomError`
6
6
- CRDTs: Loro document, Loro ephemeral store; extensible (e.g., Yjs, Yjs Awareness)
7
7
- Transports: WebSocket or any integrity-preserving transport (e.g., WebRTC)
8
8
@@ -158,7 +158,7 @@ The Rust workspace contains a minimal async WebSocket server (`loro-websocket-se
158
158
## Protocol Highlights
159
159
160
160
- Magic bytes per CRDT: "%LOR" (Loro doc), "%EPH" (Loro ephemeral), "%EPS" (persisted Loro ephemeral – tells the server to keep the latest state so new peers can load it immediately), "%YJS", "%YAW", …
- Protocol violations MAY be raised via host callbacks; implementations often
86
92
close the connection on unrecoverable errors.
87
93
@@ -156,7 +162,7 @@ The server parses headers for routing/deduplication but never decrypts `ct`.
156
162
- Message size remains bounded by the base protocol (use fragments as needed).
157
163
- Receivers SHOULD deduplicate spans via `peerId`/`start`/`end` metadata.
158
164
- Unknown `keyId` SHOULD trigger key resolution and a retry; persistent
159
-
failure is surfaced locally instead of emitting `UpdateError`.
165
+
failure is surfaced locally; no Ack is emitted because encryption/auth is end-to-end.
160
166
161
167
---
162
168
@@ -272,7 +278,7 @@ The resolved room implements:
272
278
to stay within limits.
273
279
- On receiving `DocUpdate`/fragments, the client reassembles updates and passes
274
280
them to `crdtAdaptor.applyUpdate`.
275
-
-`UpdateError` messages invoke `crdtAdaptor.handleUpdateError` if provided.
281
+
-`Ack` messages with non‑zero status trigger `crdtAdaptor.onUpdateError(updates, status)` using the original sent batch; missing batches are still logged.
0 commit comments