magicHeader static method
Create a transaction that uses MagicHeaderAndLengthByteTransformer
Transaction.magicHeader(p.inputStream, Uint8List.fromList([65,65,65])); // expects magic header AAA and then byte of length.
Implementation
static Transaction<Uint8List> magicHeader(
Stream<Uint8List> stream, List<int> header,
{int maxLen = 1024}) {
return Transaction<Uint8List>(
stream,
MagicHeaderAndLengthByteTransformer.broadcast(
header: header, maxLen: maxLen));
}