Browse Source

Differentiation connected and connetion_established implemented

master
Dirk Alders 4 years ago
parent
commit
7322eacce9
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      __init__.py

+ 4
- 1
__init__.py View File

@@ -196,9 +196,12 @@ class struct_json_protocol(object):
196 196
         self.__comm_inst__.register_connect_callback(self.__connection_established__)
197 197
         self.__comm_inst__.register_disconnect_callback(self.__authentification_state_reset__)
198 198
 
199
-    def is_connected(self):
199
+    def connected(self):
200 200
         return self.__comm_inst__.is_connected()
201 201
 
202
+    def connection_established(self):
203
+        return self.connected() and (self.__secret__ is None or self.check_authentification_state())
204
+
202 205
     def reconnect(self):
203 206
         return self.__comm_inst__.reconnect()
204 207
 

Loading…
Cancel
Save