Optionalopts: ClientOptionsthe options of the client.
activate activates this client. That is, it registers itself to the server
and receives a unique ID from the server. The given ID is used to
distinguish different clients.
broadcast broadcasts the given payload to the given topic.
Optionaloptions: BroadcastOptionscreateRevision creates a new revision for the given document.
deactivate deactivates this client.
If keepalive is true, the client will request deactivation
immediately using fetch with the keepalive option enabled. This is
useful for ensuring the deactivation request completes even if the page is
being unloaded, such as in beforeunload or unload event listeners.
If synchronous is true, the server will wait for all pending operations to
complete before deactivating.
getCondition returns the condition of this client.
getID returns a ActorID of client.
getKey returns a key of client.
getRevision retrieves a specific revision by its ID with full snapshot data.
getStatus returns the status of this client.
has checks if the given resource is attached to this client.
the key of the resource.
true if the resource is attached to this client.
isActive checks if the client is active.
listRevisions lists all revisions for the given document.
sync pushes local changes of the attached documents to the server and
receives changes of the remote replica from the server then apply them to
local documents.
For Channel in manual mode, it refreshes the TTL by sending a heartbeat.
Clientis a normal client that can communicate with the server. It has documents and sends changes of the documents in local to the server to synchronize with other replicas in remote.