close method

Future close()

Closes the underlying connection.

Returns a Future that completes when all resources have been released. This is the same as done.

Implementation

Future close() {
  _channel.sink.close();
  if (!_done.isCompleted) _done.complete();
  return done;
}