TerminatedStringTransformer.broadcast constructor

TerminatedStringTransformer.broadcast({
  1. bool sync = false,
  2. bool? cancelOnError,
  3. Uint8List? terminator,
  4. int maxLen = 1024,
  5. dynamic stripTerminator = true,
})

Splits the incoming stream at the given terminator sequence and converts to input to a string.

maxLen is the maximum number of bytes that will be collected before a terminator is detected. If more data arrives the oldest bytes will be discarded. terminator is a Uint8List of bytes. stripTerminator is a boolean indicating if the terminator should remain attached in the output.

This constructor creates a broadcast string stream

Implementation

TerminatedStringTransformer.broadcast({bool sync = false, this.cancelOnError, this.terminator, this.maxLen = 1024, this.stripTerminator = true}) {
  _partial = [];
  _controller = new StreamController<String>.broadcast(
      onListen: _onListen, onCancel: _onCancel, sync: sync);
}