writeTo method
Streams the ordered segments to sink (e.g. socket.add) and resets the
writer. Equivalent to for (final s in takeChunks()) sink(s);.
Implementation
@pragma('vm:prefer-inline')
@pragma('dart2js:tryInline')
void writeTo(void Function(List<int> bytes) sink) {
for (final seg in takeChunks()) {
sink(seg);
}
}