Differentiation connected and connetion_established implemented

This commit is contained in:
Dirk Alders 2020-09-19 19:48:45 +02:00
parent a972e90c85
commit 7322eacce9

View File

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