close method
Implementation
@override
Future<void> close() async {
await _subscription?.cancel();
_subscription = null;
_reader.reset();
if (_socket != null) {
try {
await _socket!.close();
} catch (_) {
_socket!.destroy();
}
_socket = null;
}
}