Commit c263c8b
feat(loro-websocket): add sendExternalUpdates method to LoroWebsocketClient (#46)
Add a new public method sendExternalUpdates() that allows users to send
additional updates to a specified room that are not from the local peer's
document. This is useful for forwarding updates received from other
sources or peers.
The method:
- Takes crdt type, roomId, and an array of update payloads
- Validates that the room is active and WebSocket is open
- Uses existing sendUpdateOrFragments() for proper fragmentation handling
- Throws descriptive errors if preconditions are not met
Co-authored-by: lody <[email protected]>1 parent db6a681 commit c263c8b
1 file changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1218 | 1253 | | |
1219 | 1254 | | |
1220 | 1255 | | |
| |||
0 commit comments