reckfellENGINE

WebRtcDataChannel

A Reckfell C# SDK type.

On this page
class WebRtcDataChannelReckfellSharpInherits PacketPeer

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties1

WriteModeProperty
# WriteMode
C#
public WebRtcDataChannel.WriteModeEnum WriteMode { get; set; }

The transfer mode to use when sending outgoing packet. Either text or binary.

Methods14

Closevoid
# Close
C#
public void Close();

Closes this data channel, notifying the other peer.

GetBufferedAmountint
# GetBufferedAmount
C#
public int GetBufferedAmount();

Returns the number of bytes currently queued to be sent over this channel.

Returns int
GetIdint
# GetId
C#
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).

Returns int
GetLabelstring
# GetLabel
C#
public string GetLabel();

Returns the label assigned to this channel during creation.

Returns string
GetMaxPacketLifeTimeint
# GetMaxPacketLifeTime
C#
public int GetMaxPacketLifeTime();

Returns the maxPacketLifeTime value assigned to this channel during creation. Will be 65535 if not specified.

Returns int
GetMaxRetransmitsint
# GetMaxRetransmits
C#
public int GetMaxRetransmits();

Returns the maxRetransmits value assigned to this channel during creation. Will be 65535 if not specified.

Returns int
GetProtocolstring
# GetProtocol
C#
public string GetProtocol();

Returns the sub-protocol assigned to this channel during creation. An empty string if not specified.

Returns string
GetReadyStateWebRtcDataChannel.ChannelState
# GetReadyState
C#
public WebRtcDataChannel.ChannelState GetReadyState();

Returns the current state of this channel.

Returns WebRtcDataChannel.ChannelState
GetWriteModeWebRtcDataChannel.WriteModeEnum
# GetWriteMode
C#
public WebRtcDataChannel.WriteModeEnum GetWriteMode();
Returns WebRtcDataChannel.WriteModeEnum
IsNegotiatedbool
# IsNegotiated
C#
public bool IsNegotiated();

Returns true if this channel was created with out-of-band configuration.

Returns bool
IsOrderedbool
# IsOrdered
C#
public bool IsOrdered();

Returns true if this channel was created with ordering enabled (default).

Returns bool
PollError
# Poll
C#
public Error Poll();

Reserved, but not used for now.

Returns Error
SetWriteModevoid
# SetWriteMode
C#
public void SetWriteMode(WebRtcDataChannel.WriteModeEnum writeMode);
Parameters
NameTypeDefault
writeModeWebRtcDataChannel.WriteModeEnum—
WasStringPacketbool
# WasStringPacket
C#
public bool WasStringPacket();

Returns true if the last received packet was transferred as text. See WebRtcDataChannel.WriteMode.

Returns bool

WebRtcDataChannel.ChannelState

ValueDescription
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

ValueDescription
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.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.