TinyBase logoTinyBase

Send

The Send type describes a function that knows how to dispatch a message as part of the synchronization protocol.

(
  toClientId: IdOrNull,
  requestId: IdOrNull,
  message: Message,
  body: any,
): void
TypeDescription
toClientIdIdOrNull

The optional Id of the other client (in other words, the other system) to which the message should be sent. If omitted, this is to be a broadcast.

requestIdIdOrNull

The optional Id of the message, which should be awaited in the response (if requested) to constitute a matched request/response transaction.

messageMessage

A number that indicates the type of the message, according to the Message enum.

bodyany

A message-specific payload.

returnsvoid

This has no return value.

Since

v5.0.0