createDataStreamEx [1/2]
Creates a data stream.
public abstract int createDataStreamEx( boolean reliable, boolean ordered, RtcConnection connection);
- Deprecated:
- This method is deprecated. Use createDataStreamEx [2/2] instead.
You can call this method to create a data stream and improve the reliability and ordering of data transmission.
Call timing
Call this method after joinChannelEx.
Restrictions
Each user can create up to five data streams during the lifecycle of RtcEngine. The data stream will be destroyed when leaving the channel, and the data stream needs to be recreated if needed.
Parameters
- reliable
-
Sets whether the recipients are guaranteed to receive the data stream 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 onStreamMessageError 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.
Attention: Please ensure that reliable and ordered are either both set totrue
or both set tofalse
. - ordered
-
Sets whether 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.
- connection
- The connection information. See RtcConnection.
Returns
- ID of the created data stream, if the method call succeeds.
- < 0: Failure.