disconnect method

Future<void> disconnect()

Disconnects from the WebSocket server

Implementation

Future<void> disconnect() async {
  await webSocket?.close();
  pingTimer?.cancel();
}