SyncText keeps a text string synchronized across computers via the internet using OSCRouterClient. This is useful for shared coding practice, for learning, performances, and other uses.
First code examples:
make a new SyncText with
textID |
an ID for the text (same on different computers) |
userID |
an ID for the local user (different on each computers) |
relayAddr |
An OSCRouterClient or similar to connect the SyncTexts. |
all known syncTexts
the text that a new syncText gets when no text is found online.
the id for the synced text
the id for the local user/computer
the relay to use for sync messages
the current synced text
the document that shows and edits currText
find or make and show a document for currText
enable and disable sync-sending on currText
flag whether currently sync-sending or not
lock and unlock editing of currText on textDoc
flag whether editing currently locked
flag whether currently sync-sending or not
different versions of the synced text as last sent from synced users.
the last received version of the synced text
the last sent version of the synced text
a local ID merging textID and userID.
ask other nodes for the current text usually not needed to do explicitly.
set currText by hand. usually only needed internally.
set text in textDoc by hand usually never needed internally.
send text to sync to otherName. usually never needed internally, happens when requested.
otherName |
whether the text is currently synced or not. this is false when SyncText is made, and true after synced to incoming text or after timeout.