Pārlūkot izejas kodu

Differentiation connected and connetion_established implemented

master
Dirk Alders 4 gadus atpakaļ
vecāks
revīzija
7322eacce9
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4
    1
      __init__.py

+ 4
- 1
__init__.py Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt