writeAll method
Implementation
Future<bool> writeAll(List<int> data, {int timeoutMs = -1}) async {
final buf = Uint8List.fromList(data);
var off = 0;
while (off < buf.length) {
final n = _inner.write(buf.sublist(off), timeout: timeoutMs);
if (n <= 0) return false;
off += n;
}
return true;
}