Packages@robojs/sync
SyncBroadcastResult<ClientData>
Interface: SyncBroadcastResult<ClientData>
Result object returned by useSyncBroadcast hook.
Type Parameters
| Type Parameter | Default type |
|---|---|
ClientData | unknown |
Properties
| Property | Type | Description |
|---|---|---|
broadcast | (payload: unknown) => void | Send an ephemeral message to all clients in the room |
context | SyncContext<ClientData> | The sync context for this key/room |
send | (clientId: string, payload: unknown) => void | Send an ephemeral message to a specific client |
