sendStreamMessage method

  1. @override
Future<void> sendStreamMessage(
  1. int streamId,
  2. String message
)

Sends the data stream message.

The SDK has the following restrictions on this method:

  • Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 KB.
  • Each client can send up to 6 KB of data per second.
  • Each user can have up to five data channels simultaneously.

A successful method call triggers the RtcChannelEventHandler.streamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the RtcChannelEventHandler.streamMessageError callback on the remote client.

Parameter streamId ID of the sent data stream returned by the RtcChannel.createDataStream method.

Parameter message The message data.

Implementation

@override
Future<void> sendStreamMessage(int streamId, String message) {
  return _invokeMethod(
      'sendStreamMessage', {'streamId': streamId, 'message': message});
}