Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
WriteMode
WebRTCDataChannel.swift:10enum WriteMode
Cases
case text
Tells the channel to send data over this channel as text. An external peer (non-Godot) would receive this as a string.
case binary
Tells the channel to send data over this channel as binary. An external peer (non-Godot) would receive this as array buffer or blob.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (15) members.
Types
Type members
Instance members
var writeMode: WebRTCDataChannel.WriteMode
The transfer mode to use when sending outgoing packet. Either text or binary.
func close(
) Closes this data channel, notifying the other peer.
func getBufferedAmount(
) -> Int32 Returns the number of bytes currently queued to be sent over this channel.
func getId(
) -> Int32 Returns the ID assigned to this channel during creation (or auto-assigned during negotiation).
func getLabel(
) -> String Returns the label assigned to this channel during creation.
func getMaxPacketLifeTime(
) -> Int32 Returns the
maxPacketLifeTime
value assigned to this channel during creation.func getMaxRetransmits(
) -> Int32 Returns the
maxRetransmits
value assigned to this channel during creation.func getProtocol(
) -> String Returns the sub-protocol assigned to this channel during creation. An empty string if not specified.
func getReadyState(
) -> WebRTCDataChannel.ChannelState Returns the current state of this channel, see
ChannelState
.func isNegotiated(
) -> Bool Returns
true
if this channel was created with out-of-band configuration.func isOrdered(
) -> Bool Returns
true
if this channel was created with ordering enabled (default).func poll(
) -> GodotError Reserved, but not used for now.
func wasStringPacket(
) -> Bool Returns
true
if the last received packet was transferred as text. SeewriteMode
.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.