attachAsync

fun attachAsync(document: Document, initialPresence: P = emptyMap(), syncMode: Client.SyncMode = SyncMode.Realtime, schema: String? = null): Deferred<OperationResult>

Attaches the given Document to this Client. It tells the server that this Client will synchronize the given document.

Parameters

initialPresence

: is the initial presence of the client.

syncMode

: defines the synchronization mode of the document.

schema

: is the schema of the document. It is used to validate the document.