| am_sync_state_new | R Documentation |
Creates a new synchronization state for managing communication with a peer. The sync state tracks what changes have been sent and received, enabling efficient incremental synchronization.
am_sync_state_new()
IMPORTANT: Sync state is document-independent. The same sync state
is used across multiple sync message exchanges with a specific peer.
The document is passed separately to am_sync_encode() and am_sync_decode().
An external pointer to the sync state with class "am_syncstate".
# Create two documents
doc1 <- am_create()
doc2 <- am_create()
# Create sync states for each peer
sync1 <- am_sync_state_new()
sync2 <- am_sync_state_new()
# Use with am_sync_encode() and am_sync_decode()
am_close(doc1)
am_close(doc2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.