method is_connected added

This commit is contained in:
Dirk Alders 2020-09-09 10:40:34 +02:00
parent b0857e4569
commit 1fa2e2fcf9

View File

@ -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