TinyBase logoTinyBase β

broadcastChanges

The broadcastChanges function allows you to broadcast Store changes to all the client connections of a TinyBasePartyKitServer.

broadcastChanges(
  server: TinyBasePartyKitServer,
  changes: Changes,
  without?: string[],
): Promise<void>
TypeDescription
serverTinyBasePartyKitServer

A reference to the TinyBasePartyKitServer object.

changesChanges

The Store changes to broadcast to the server's clients.

without?string[]

An optional array of client connection Ids to exclude from the broadcast.

returnsPromise<void>

This is intended for specialist applications that require the ability to update clients of a TinyBasePartyKitServer in their own custom ways.

The function is asynchronous, so you should use the await keyword or handle its completion as a promise.

Since

v4.5.1