diff --git a/__init__.py b/__init__.py index 8433918..9eed7dc 100644 --- a/__init__.py +++ b/__init__.py @@ -196,9 +196,12 @@ class struct_json_protocol(object): self.__comm_inst__.register_connect_callback(self.__connection_established__) self.__comm_inst__.register_disconnect_callback(self.__authentification_state_reset__) - def is_connected(self): + def connected(self): return self.__comm_inst__.is_connected() + def connection_established(self): + return self.connected() and (self.__secret__ is None or self.check_authentification_state()) + def reconnect(self): return self.__comm_inst__.reconnect()