forward method

Future<void> forward(
  1. BleReceivedMessage message, {
  2. String? clientId,
})

Forwards unchanged bytes to clientId, or to everyone except the sender. Throws if no recipient is subscribed. Does not retain sender identity in the payload: use an application envelope when recipients need that detail. IDs are connection-local; applications must authorize routing themselves.

Implementation

Future<void> forward(BleReceivedMessage message, {String? clientId}) =>
    sendBytes(
      message.data,
      clientId: clientId,
      excludeClientId: clientId == null ? message.clientId : null,
    );