writeAll method

Future<void> writeAll(
  1. List<int> buf
)

Writes the whole buffer to the given raw byte stream.

Implementation

Future<void> writeAll(
  List<int> buf,
) async {
  final request = RequestNetworkStreamWriteAll(
    stream: handle,
    buf: buf,
  );
  final response = await client.invoke(request);
  switch (response) {
    case ResponseUnit(): return;
    default: throw UnexpectedResponse();
  }
}