disconnect method

Future<void> disconnect()

Disconnect from the server and close the socket.

Implementation

Future<void> disconnect() async {
  await _socket.close();
  await _rx.cancel();
  await _router.close();
}