From 7322eacce975646a6947804fa89bd3b26fdb149d Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sat, 19 Sep 2020 19:48:45 +0200 Subject: [PATCH] Differentiation connected and connetion_established implemented --- __init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()