# Create two documents
doc1 <- am_create()
doc2 <- am_create()
# Create sync states for each peer
sync1 <- am_sync_state()
sync1
sync2 <- am_sync_state()
# Use with am_sync_encode() and am_sync_decode()
am_close(doc1)
am_close(doc2)
Run the code above in your browser using DataLab