WebRtcDataChannel
A Reckfell C# SDK type.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
WriteModeProperty
public WebRtcDataChannel.WriteModeEnum WriteMode { get; set; }The transfer mode to use when sending outgoing packet. Either text or binary.
Methods14
Closevoid
public void Close();Closes this data channel, notifying the other peer.
GetBufferedAmountint
public int GetBufferedAmount();Returns the number of bytes currently queued to be sent over this channel.
intGetIdint
public int GetId();Returns the ID assigned to this channel during creation (or auto-assigned during negotiation).
If the channel is not negotiated out-of-band the ID will only be available after the connection is established (will return 65535 until then).
intGetLabelstring
public string GetLabel();Returns the label assigned to this channel during creation.
stringGetMaxPacketLifeTimeint
public int GetMaxPacketLifeTime();Returns the maxPacketLifeTime value assigned to this channel during creation.
Will be 65535 if not specified.
intGetMaxRetransmitsint
public int GetMaxRetransmits();Returns the maxRetransmits value assigned to this channel during creation.
Will be 65535 if not specified.
intGetProtocolstring
public string GetProtocol();Returns the sub-protocol assigned to this channel during creation. An empty string if not specified.
stringGetReadyStateWebRtcDataChannel.ChannelState
public WebRtcDataChannel.ChannelState GetReadyState();Returns the current state of this channel.
WebRtcDataChannel.ChannelStateGetWriteModeWebRtcDataChannel.WriteModeEnum
public WebRtcDataChannel.WriteModeEnum GetWriteMode();WebRtcDataChannel.WriteModeEnumIsNegotiatedbool
public bool IsNegotiated();Returns true if this channel was created with out-of-band configuration.
boolIsOrderedbool
public bool IsOrdered();Returns true if this channel was created with ordering enabled (default).
boolPollError
public Error Poll();Reserved, but not used for now.
ErrorSetWriteModevoid
public void SetWriteMode(WebRtcDataChannel.WriteModeEnum writeMode);| Name | Type | Default |
|---|---|---|
writeMode | WebRtcDataChannel.WriteModeEnum | — |
WasStringPacketbool
public bool WasStringPacket();Returns true if the last received packet was transferred as text. See WebRtcDataChannel.WriteMode.
boolWebRtcDataChannel.ChannelState
| Value | Description |
|---|---|
Closed = 3 | The channel was closed, or connection failed. |
Closing = 2 | The channel is being closed, no new messages will be accepted, but those already in queue will be flushed. |
Connecting = 0 | The channel was created, but it's still trying to connect. |
Open = 1 | The channel is currently open, and data can flow over it. |
WebRtcDataChannel.WriteModeEnum
| Value | Description |
|---|---|
Binary = 1 | Tells the channel to send data over this channel as binary. An external peer (non-Reckfell) would receive this as array buffer or blob. |
Text = 0 | Tells the channel to send data over this channel as text. An external peer (non-Reckfell) would receive this as a string. |