createDataStream method

  1. @override
  2. @deprecated
Future<int?> createDataStream(
  1. bool reliable,
  2. bool ordered
)

Creates a data stream.

Each user can create up to five data streams during the life cycle of the RtcChannel instance.

Deprecated

This method is deprecated from v3.3.1.

Note

  • Set both the reliable and ordered parameters to true or false. Do not set one as true and the other as false.

Parameter reliable Sets whether or not the recipients are guaranteed to receive the data stream from the sender within five seconds.

  • true: The recipients receive the data from the sender within five seconds. If the recipient does not receive the data within five seconds, the SDK triggers the RtcChannelEventHandler.streamMessageError callback and returns an error code.
  • false: There is no guarantee that the recipients receive the data stream within five seconds and no error message is reported for any delay or missing data stream.

Parameter ordered Determines whether or not the recipients receive the data stream in the sent order.

  • true: The recipients receive the data in the sent order.
  • false: The recipients do not receive the data in the sent order.

Returns

  • 0: Success.
  • < 0: Failure.

Implementation

@override
@deprecated
Future<int?> createDataStream(bool reliable, bool ordered) {
  return _invokeMethod('createDataStream', {
    'reliable': reliable,
    'ordered': ordered,
  });
}