Class WebRTCDataChannel
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
- API Level:
- 9
Provides the ability to control WebRTC data channel.
C#Copypublic class WebRTCDataChannel : IDisposable
- Inheritance
-
System.ObjectWebRTCDataChannel
- Implements
-
System.IDisposable
Constructors
WebRTCDataChannel(WebRTC, String)
Initializes a new instance of the WebRTCDataChannel class.
Declaration
C#Copypublic WebRTCDataChannel(WebRTC webRtc, string label)
Parameters
Type | Name | Description |
---|---|---|
WebRTC | webRtc | The owner of this WebRTCDataChannel. |
System.String | label | The name of this data channel. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The webRtc or label is null. |
API Level: 9
WebRTCDataChannel(WebRTC, String, Bundle)
Initializes a new instance of the WebRTCDataChannel class.
Declaration
C#Copypublic WebRTCDataChannel(WebRTC webRtc, string label, Bundle bundle)
Parameters
Type | Name | Description |
---|---|---|
WebRTC | webRtc | The owner of this WebRTCDataChannel. |
System.String | label | The name of this data channel. |
Bundle | bundle | The data channel option. |
Remarks
The bundle is similar format as the RTCDataChannelInit members outlined https://www.w3.org/TR/webrtc/#dom-rtcdatachannelinit.
The following attributes can be set to options by using Bundle API:
'ordered' of type bool : Whether the channel will send data with guaranteed ordering. The default value is true.
'max-packet-lifetime' of type int : The time in milliseconds to attempt transmitting unacknowledged data. -1 for unset. The default value is -1.
'max-retransmits' of type int : The number of times data will be attempted to be transmitted without acknowledgement before dropping. The default value is -1.
'protocol' of type string : The subprotocol used by this channel. The default value is NULL.
'id' of type int : Override the default identifier selection of this channel. The default value is -1.
'priority' of type int : The priority to use for this channel(1:very low, 2:low, 3:medium, 4:high). The default value is 2.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The webRtc or label is null. |
API Level: 9
Properties
Declaration
C#Copypublic string Label { get; }
Property Value
Type | Description |
---|---|
System.String | The label. |
API Level: 9
Methods
Declaration
C#Copypublic void Dispose()
API Level: 9
Declaration
C#Copypublic void Send(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | The byte data to send |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The WebRTCDataChannel has already been disposed. |
API Level: 9
Declaration
C#Copypublic void Send(string data)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | The string data to send |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The WebRTCDataChannel has already been disposed. |
API Level: 9
Events
Declaration
C#Copypublic event EventHandler<EventArgs> Closed
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCDataChannelErrorOccurredEventArgs> ErrorOccurred
Event Type
Type | Description |
---|---|
System.EventHandler<WebRTCDataChannelErrorOccurredEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCDataChannelMessageReceivedEventArgs> MessageReceived
Event Type
Type | Description |
---|---|
System.EventHandler<WebRTCDataChannelMessageReceivedEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<EventArgs> Opened
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |