createDataStreamEx abstract method

Future<int> createDataStreamEx({
  1. required DataStreamConfig config,
  2. required RtcConnection connection,
})

Creates a data stream.

If you need a more comprehensive, low-latency, high-concurrency, and scalable real-time messaging and state synchronization solution, we recommend using Real-time Messaging. During the lifecycle of RtcEngine, each user can create up to 5 data streams. The data streams are destroyed when leaving the channel. If needed again, you must recreate them.

  • config Data stream configuration. See DataStreamConfig.
  • connection Connection information. See RtcConnection.

Returns ID of the created data stream: method call succeeded. < 0: method call failed. See Error Codes for details and resolution suggestions.

Implementation

Future<int> createDataStreamEx(
    {required DataStreamConfig config, required RtcConnection connection});