terminated static method

Transaction<Uint8List> terminated(
  1. Stream<Uint8List> stream,
  2. Uint8List terminator, {
  3. int maxLen = 1024,
  4. bool stripTerminator = true,
})

Create a transaction that transforms the incoming stream into events delimited by 'terminator'.

var c = Transaction.terminated(p.inputStream, Uint8List.fromList([13, 10]));

Implementation

static Transaction<Uint8List> terminated(
    Stream<Uint8List> stream, Uint8List terminator,
    {int maxLen = 1024, bool stripTerminator = true}) {
  return Transaction<Uint8List>(
      stream,
      TerminatedTransformer.broadcast(
          terminator: terminator,
          maxLen: maxLen,
          stripTerminator: stripTerminator));
}