MagicHeaderAndLengthByteTransformer constructor

MagicHeaderAndLengthByteTransformer({
  1. bool sync = false,
  2. bool? cancelOnError,
  3. List<int?>? header,
  4. int maxLen = 1024,
  5. Duration clearTimeout = const Duration(seconds: 1),
})

Implementation

MagicHeaderAndLengthByteTransformer({bool sync = false, this.cancelOnError, this.header, this.maxLen = 1024, this.clearTimeout = const Duration(seconds: 1)}) {
  _partial = [];
  _controller = new StreamController<Uint8List>(
      onListen: _onListen,
      onCancel: _onCancel,
      onPause: () {
        _subscription!.pause();
      },
      onResume: () {
        _subscription!.resume();
      },
      sync: sync);
}