sendStreamMessage method Null safety

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

Sends data stream messages.

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 RtcEngineEventHandler.streamMessage callback on the remote client, from which the remote user gets the stream message.

A failed method call triggers the RtcEngineEventHandler.streamMessageError callback on the remote client.

Note

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

Parameter message Sent data.

Implementation

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