Peer class
Properties
connection
↔ RTCPeerConnection
Peer connection from flutter_webrtc used for transfers.
For advanced use cases some of the methods and properties of this object
is useful. It is only available after connect() has been called.
getter/setter pair
hashCode
→ int
The hash code for this object.
no setter inherited
onBinaryData
↔ (dynamic Function(Uint8List ) ?)
Called when binary channel message was received from the remote peer
getter/setter pair
onSignal
↔ (dynamic Function(SignalingInfo ) ?)
Called when the peer wants to send signaling data to the remote peer.
getter/setter pair
onTextData
↔ (dynamic Function(String ) ?)
Called when text channel message was received from the remote peer
getter/setter pair
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
connect ()
→ dynamic
Call to start connection to remote peer.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postIceCandidates ()
→ dynamic
sendBinary (Uint8List bytes )
→ dynamic
Send binary data to remote peer. Call peer.connect() first to ensure
data channel is ready.
sendText (String text )
→ dynamic
Send text to remote peer. Call peer.connect() first to ensure
data channel is ready.
signal (SignalingInfo info )
→ dynamic
Call this method whenever signaling data is received from remote peer
toString ()
→ String
A string representation of this object.
inherited
Static Methods
create ({bool initiator = false , bool verbose = false , Map <String , dynamic > ? config , RTCDataChannelInit? dataChannelConfig })
→ Future <Peer >
Creates a new Peer