diff --git a/__init__.py b/__init__.py index dfbfe35..155192b 100644 --- a/__init__.py +++ b/__init__.py @@ -195,6 +195,9 @@ class struct_json_protocol(object): self.__comm_inst__.register_connect_callback(self.__clean_receive_buffer__) self.__comm_inst__.register_disconnect_callback(self.__authentification_state_reset__) + def is_connected(self): + return self.__comm_inst__.is_connected() + def __authentification_state_reset__(self): logger.info("%s Resetting authentification state to AUTH_STATE_UNKNOWN_CLIENT", self.LOG_PREFIX) self.__authentification_state__ = self.AUTH_STATE_UNKNOWN_CLIENT