DataConsumer constructor

DataConsumer({
  1. required String id,
  2. required String dataProducerId,
  3. required RTCDataChannel dataChannel,
  4. required SctpStreamParameters sctpStreamParameters,
  5. Map<String, dynamic> appData = const <String, dynamic>{},
  6. bool closed = false,
  7. String? peerId,
})

@emits transportclose @emits open @emits error - (error: Error) @emits close @emits message - (message: any) @emits @close

Implementation

DataConsumer({
  required this.id,
  required this.dataProducerId,
  required this.dataChannel,
  required this.sctpStreamParameters,
  this.appData = const <String, dynamic>{},
  this.closed = false,
  this.peerId
}) : observer = EnhancedEventEmitter(),
      super() {
  _logger.debug('constructor()');

  _handleDataChannel();
}