close method
Closes the connection immediately and does not wait for any ongoing writes
Implementation
Future<void> close() {
return Future.wait([
output.close(),
_readStreamSubscription.cancel(),
(!_readStreamController.isClosed)
? _readStreamController.close()
: Future.value()
], eagerError: true);
}