def connectShow(self): while self.connectedShow == False: try: QueueManager.register('show') manager = QueueManager(address=(self.server_addr, 9111), authkey=b'dihuge') manager.connect() self.show_sender = manager.show() self.connectedShow = True except Exception as e: print('show_ConnectRefuseRec', e) time.sleep(1)
def connectShow(self): # 显示图像队列 self.connectedCamShow = True #server_addr = '0.0.0.0' server_addr = self.server_addr # 检测结果队列 self.show_queue = Queue() QueueManager.register('show', callable=lambda: self.show_queue) cambar_manager = QueueManager(address=(server_addr, 9111), authkey=b'dihuge') try: cambar_manager.start() except Exception as e: print(e) cambar_manager.connect() self.show = cambar_manager.show()