disconnect method
Implementation
Future<bool> disconnect() async {
if (_socket == null) {
return true;
}
_socketConnected = false;
_socketConnectedController.add(_socketConnected);
await _socket!.flush();
_socket!.destroy();
return true;
}