RTCDataChannelMessage class

A class that represents a datachannel message. Can either contain binary data as a Uint8List or text data as a String.

Constructors

RTCDataChannelMessage(String text)
Construct a text message with a String.
RTCDataChannelMessage.fromBinary(Uint8List binary)
Construct a binary message with a Uint8List.

Properties

binary Uint8List
Binary contents of this message as Uint8List. Use only on binary messages. See: isBinary.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
isBinary bool
Tells whether this message contains binary. If this is false, it's a text message.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
text String
Text contents of this message as String. Use only on text messages. See: isBinary.
read-only
type MessageType
read-only

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited