stop method

Future stop()

Implementation

Future stop() async {
  if (_socket != null) {
    _socket!.close();
    _socket = null;
  }

  if (_timer != null) {
    _timer!.cancel();
    _timer = null;
  }
}