close method
Disposes of this client.
Implementation
@override
Future close() {
if (_peer?.isClosed != true) _peer!.close();
for (var c in _requests.values) {
if (!c.isCompleted) {
c.completeError(StateError(
'The client was closed before the server responded to this request.'));
}
}
for (var s in _subscriptions) {
s._close();
}
_requests.clear();
return Future.value();
}