OptionalconnectOptional lifecycle hook called when the provider starts.
OptionaldisconnectOptional lifecycle hook called when the provider stops.
OptionalgetOptional observable transport state for diagnostics and UI adapters.
Register a handler the channel calls whenever it receives bytes from a
remote peer. The provider uses these to import the update into the local
Loro doc and then call onPeerChange.
Returns an unsubscribe function.
OptionalonOptional subscription to transport-state changes.
Send a binary snapshot/update to all connected peers. Called by the provider after every local entity write.
Minimal transport channel for exchanging Loro binary snapshots with peers.
Consumers implement this once for their transport (WebSocket, Supabase Realtime broadcast, etc.) and pass it to
createLoroProvider.