writeAll method

  1. @override
void writeAll(
  1. Iterable objects, [
  2. String separator = ""
])
override

Iterates over the given objects and writes them in sequence.

If separator is provided, a write with the separator is performed between any two elements of objects.

This operation is non-blocking. See flush or done for how to get any errors generated by this call.

Implementation

@override
void writeAll(Iterable<dynamic> objects, [String separator = ""]) {
  _inner.writeAll(objects);
  if (headers.contentType != ContentType.binary) {
    try {
      _sendBuffer?.writeAll(objects, separator);
    } catch (ex) {
      // log error if required
    }
    _checkAndResetBufferIfRequired();
  }
}