Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

WebRTCDataChannel

Inherits: PacketPeer < RefCounted < Object

Inherited By: WebRTCDataChannelExtension

There is currently no description for this class. Please help us by contributing one!

Properties

WriteMode

write_mode

1

Methods

void

close ( )

int

get_buffered_amount ( ) const

int

get_id ( ) const

String

get_label ( ) const

int

get_max_packet_life_time ( ) const

int

get_max_retransmits ( ) const

String

get_protocol ( ) const

ChannelState

get_ready_state ( ) const

bool

is_negotiated ( ) const

bool

is_ordered ( ) const

Error

poll ( )

bool

was_string_packet ( ) const


Enumerations

enum WriteMode:

WriteMode WRITE_MODE_TEXT = 0

Tells the channel to send data over this channel as text. An external peer (non-Godot) would receive this as a string.

WriteMode WRITE_MODE_BINARY = 1

Tells the channel to send data over this channel as binary. An external peer (non-Godot) would receive this as array buffer or blob.


enum ChannelState:

ChannelState STATE_CONNECTING = 0

The channel was created, but it's still trying to connect.

ChannelState STATE_OPEN = 1

The channel is currently open, and data can flow over it.

ChannelState STATE_CLOSING = 2

The channel is being closed, no new messages will be accepted, but those already in queue will be flushed.

ChannelState STATE_CLOSED = 3

The channel was closed, or connection failed.


Property Descriptions

WriteMode write_mode = 1

The transfer mode to use when sending outg