Documentation
¶
Index ¶
- type Advanced
- type Any
- type ChannelState
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPacketPeer() PacketPeer.Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsWebRTCDataChannel() Instance
- func (self Instance) Close()
- func (self Instance) GetBufferedAmount() int
- func (self Instance) GetId() int
- func (self Instance) GetLabel() string
- func (self Instance) GetMaxPacketLifeTime() int
- func (self Instance) GetMaxRetransmits() int
- func (self Instance) GetProtocol() string
- func (self Instance) GetReadyState() ChannelState
- func (self Instance) ID() ID
- func (self Instance) IsNegotiated() bool
- func (self Instance) IsOrdered() bool
- func (self Instance) Poll() error
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetWriteMode(value WriteMode)
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) WasStringPacket() bool
- func (self Instance) WriteMode() WriteMode
- type WriteMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type ChannelState ¶
type ChannelState int //gd:WebRTCDataChannel.ChannelState
const ( /*The channel was created, but it's still trying to connect.*/ StateConnecting ChannelState = 0 /*The channel is currently open, and data can flow over it.*/ StateOpen ChannelState = 1 /*The channel is being closed, no new messages will be accepted, but those already in queue will be flushed.*/ StateClosing ChannelState = 2 /*The channel was closed, or connection failed.*/ StateClosed ChannelState = 3 )
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsPacketPeer ¶
func (self *Extension[T]) AsPacketPeer() PacketPeer.Instance
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsWebRTCDataChannel ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.WebRTCDataChannel
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsPacketPeer ¶
func (self Instance) AsPacketPeer() PacketPeer.Instance
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsWebRTCDataChannel ¶
func (Instance) Close ¶
func (self Instance) Close()
Closes this data channel, notifying the other peer.
func (Instance) GetBufferedAmount ¶
Returns the number of bytes currently queued to be sent over this channel.
func (Instance) 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).
func (Instance) GetMaxPacketLifeTime ¶
Returns the maxPacketLifeTime value assigned to this channel during creation. Will be 65535 if not specified.
func (Instance) GetMaxRetransmits ¶
Returns the maxRetransmits value assigned to this channel during creation. Will be 65535 if not specified.
func (Instance) GetProtocol ¶
Returns the sub-protocol assigned to this channel during creation. An empty string if not specified.
func (Instance) GetReadyState ¶
func (self Instance) GetReadyState() ChannelState
Returns the current state of this channel, see ChannelState.
func (Instance) IsNegotiated ¶
Returns true if this channel was created with out-of-band configuration.
func (Instance) IsOrdered ¶
Returns true if this channel was created with ordering enabled (default).
func (Instance) SetWriteMode ¶
func (Instance) WasStringPacket ¶
Returns true if the last received packet was transferred as text. See [member write_mode].
type WriteMode ¶
type WriteMode int //gd:WebRTCDataChannel.WriteMode
const ( /*Tells the channel to send data over this channel as text. An external peer (non-Godot) would receive this as a string.*/ WriteModeText WriteMode = 0 /*Tells the channel to send data over this channel as binary. An external peer (non-Godot) would receive this as array buffer or blob.*/ WriteModeBinary WriteMode = 1 )