closeSocket method

dynamic closeSocket()

Implementation

closeSocket() {
  if (_socket != null) {
    print("here in close sockettt $_socket");
    _socket?.close();
    _socket = null;
    if (_socket == null) {
      print("this is socket22222");
    } else {
      print("rrrr ");
    }
    timer?.cancel();
  }
}