write method
- CID cid,
- Uint8List block
Writes a single section.
The cid and block bytes are buffered until close or closeStream
is called.
Implementation
Future<void> write(CID cid, Uint8List block) async {
if (block.length > maxBlockSize) {
throw CarSectionException(
'Block size ${block.length} exceeds maximum $maxBlockSize',
);
}
_pending.add(_PendingSection(cid, block));
}