TinyBase logoTinyBase

broadcastTransactionChanges

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

broadcastTransactionChanges(
  server: TinyBasePartyKitServer,
  transactionChanges: TransactionChanges,
  without?: string[],
): Promise<void>
TypeDescription
serverTinyBasePartyKitServer

A reference to the TinyBasePartyKitServer object.

transactionChangesTransactionChanges

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