Peer class
Methods
-
addEventListener<T>(EventListener<T> listener)
→ bool
-
Adds a listener to the emitter.
When an event is emitted, the listeners added will be matched.
inherited
-
call(String peer, MediaStream? stream, [CallOption? options])
→ MediaConnection?
-
-
connect(String peer, [PeerConnectOption? options])
→ DataConnection?
-
-
destroy()
→ void
-
-
disconnect()
→ void
-
-
emit<T>(String type, [T? data])
→ bool
-
Emit a event with a specific event type and data type.
This will broadcast the message to all listeners that match the same event type and data type.
inherited
-
emitError(String type, dynamic error)
→ void
-
inherited
-
emitEvent<T extends Event>(T event)
→ bool
-
Emits an event to all listeners.
This will broadcast the event to all listeners that match the same event type and data type.
inherited
-
getConnection(String peerId, String connectionId)
→ BaseConnection<EventsWithError<String>, String>?
-
-
getMessages(String connectionId)
→ List<ServerMessage>
-
-
init([String? id])
→ Future<void>
-
-
listAllPeers(dynamic cb(List))
→ void
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
off<T>({String? type, EventCallback<T>? callback})
→ bool
-
Remove an attached listener, by event type, data type and callback...
inherited
-
on<T>(String? type, EventCallback<T> callback)
→ EventListener<T>
-
Attach a listener to an emitter.
Calls the
callback
whenever there's a new event of the specified event type and data type.
inherited
-
onAny<T>(EventCallback<T> callback)
→ EventListener<T>
-
Same as
on
but without a type.
inherited
-
once<T>(String? type, [EventCallback<T>? callback])
→ Future<T>
-
Same as
on
but with a callback that is only called once.
inherited
-
reconnect()
→ void
-
-
removeConnection(dynamic connection)
→ void
-
-
removeEventListener<T>(EventListener<T> listener)
→ bool
-
Removes a listener from the emitter.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited