DataConsumer class
Constructors
-
DataConsumer({required String id, required String dataProducerId, required RTCDataChannel dataChannel, required SctpStreamParameters sctpStreamParameters, Map<String, dynamic> appData = const <String, dynamic>{}, bool closed = false, String? peerId})
-
@emits transportclose
@emits open
@emits error - (error: Error)
@emits close
@emits message - (message: any)
@emits @close
Methods
-
callback(Function func, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5])
→ dynamic
-
inherited
-
callbackAsFuture(Function func, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5])
→ Future
-
inherited
-
clearListeners()
→ void
-
This function unbinds all the handlers for all the events
inherited
-
close()
→ void
-
Closes the DataConsumer.
-
emit(String event, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5])
→ void
-
This function triggers all the handlers currently listening
to
event
and passes them data
.
inherited
-
emitAsFuture(String event, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5])
→ Future
-
This function triggers all the handlers currently listening
to
event
and passes them data
.
inherited
-
listeners(dynamic event)
→ List
-
Return function list named
event
.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
off(String event)
→ void
-
This function attempts to unbind all the
handler
from the event
inherited
-
on(String event, Function handler)
→ void
-
This function binds the
handler
as a listener to the event
inherited
-
once(String event, Function handler)
→ void
-
This function binds the
handler
as a listener to the first
occurrence of the event
. When handler
is called once,
it is removed.
inherited
-
remove(String event, Function handler)
→ void
-
This function attempts to unbind the
handler
from the event
inherited
-
safeEmit(String event, [Map<String, dynamic>? args])
→ void
-
inherited
-
safeEmitAsFuture(String event, [Map<String, dynamic>? args])
→ Future
-
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
transportClosed()
→ void
-
Transport was closed.