Closes this data channel, notifying the other peer.
Returns the number of bytes currently queued to be sent over this channel.
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 [code]65535[/code] until then).
Returns the label assigned to this channel during creation.
Returns the [code]maxPacketLifeTime[/code] value assigned to this channel during creation.
Will be [code]65535[/code] if not specified.
Returns the [code]maxRetransmits[/code] value assigned to this channel during creation.
Will be [code]65535[/code] if not specified.
Returns the sub-protocol assigned to this channel during creation. An empty string if not specified.
Returns the current state of this channel, see [enum ChannelState].
Returns [code]true[/code] if this channel was created with out-of-band configuration.
Returns [code]true[/code] if this channel was created with ordering enabled (default).
Reserved, but not used for now.
Returns [code]true[/code] if the last received packet was transferred as text. See [member write_mode].
The transfer mode to use when sending outgoing packet. Either text or binary.
Tells the channel to send data over this channel as text. An external peer (non-Godot) would receive this as a string.
Tells the channel to send data over this channel as binary. An external peer (non-Godot) would receive this as array buffer or blob.
The channel was created, but it's still trying to connect.
The channel is currently open, and data can flow over it.
The channel is being closed, no new messages will be accepted, but those already in queue will be flushed.
The channel was closed, or connection failed.