Esempio n. 1
0
def close_and_wait_reconnect(wm: WebsocketManage, delay_in_ms: int):
    if wm.original_connection is not None:
        wm.original_connection.close()
        del WEBSOCKET_CONNECTION_HANDLER[wm.original_connection]
        wm.original_connection = None
        wm.state = ConnectionState.WAIT_RECONNECT
        wm.reconnect_at = delay_in_ms
 def __create_websocket_manage(self, request):
     manager = WebsocketManage(self.__api_key, self.__secret_key,
                               self.__uri, request)
     self.__websocket_manage_list.append(manager)
     manager.connect()
     SubscribeClient.subscribe_watch_dog.on_connection_created(manager)
Esempio n. 3
0
 def __create_websocket_manage(self, request):
     manager = WebsocketManage(self.__api_key, self.__secret_key,
                               self.__uri, request)
     manager.connect()