Class WebRtcDataChannel
- Namespace
- Godot
- Assembly
- GodotSharp.dll
[GodotClassName("WebRTCDataChannel")]
public class WebRtcDataChannel : PacketPeer, IDisposable
- Inheritance
-
WebRtcDataChannel
- Implements
- Derived
- Inherited Members
Properties
WriteMode
The transfer mode to use when sending outgoing packet. Either text or binary.
public WebRtcDataChannel.WriteModeEnum WriteMode { get; set; }
Property Value
Methods
Close()
Closes this data channel, notifying the other peer.
public void Close()
GetBufferedAmount()
Returns the number of bytes currently queued to be sent over this channel.
public int GetBufferedAmount()
Returns
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).
public int GetId()
Returns
GetLabel()
Returns the label assigned to this channel during creation.
public string GetLabel()
Returns
GetMaxPacketLifeTime()
Returns the maxPacketLifeTime
value assigned to this channel during creation.
Will be 65535
if not specified.
public int GetMaxPacketLifeTime()
Returns
GetMaxRetransmits()
Returns the maxRetransmits
value assigned to this channel during creation.
Will be 65535
if not specified.
public int GetMaxRetransmits()
Returns
GetProtocol()
Returns the sub-protocol assigned to this channel during creation. An empty string if not specified.
public string GetProtocol()
Returns
GetReadyState()
Returns the current state of this channel, see WebRtcDataChannel.ChannelState.
public WebRtcDataChannel.ChannelState GetReadyState()
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
IsNegotiated()
Returns true
if this channel was created with out-of-band configuration.
public bool IsNegotiated()
Returns
IsOrdered()
Returns true
if this channel was created with ordering enabled (default).
public bool IsOrdered()
Returns
Poll()
Reserved, but not used for now.
public Error Poll()
Returns
WasStringPacket()
Returns true
if the last received packet was transferred as text. See WriteMode.
public bool WasStringPacket()