Esempio n. 1
0
 def proxyServerThread(self):
     print "Starting socket server thread "
     portstr = FanbotConfig.getProxyPort() 
     port = int(portstr)
     host = "localhost"
     self.labelProxyHost.SetLabel( '%s : %d' % (host,port) )
     ProxyControl.alive = True
     try: 
         self.server = SocketServer.ThreadingTCPServer((host, port), ProxyHandler)
         self.server.serve_forever()
     except Exception as e:
         print "unable to start server: ", e.message  
         self.shutdown()
Esempio n. 2
0
    def initCommunication(self):
        host = FanbotConfig.getSimulationIP()
        port = FanbotConfig.getSimulationIPPort()
        self.textSimulation.SetValue(host)
        self.textPort.SetValue(str(port))

        self.proxyPort = FanbotConfig.getProxyPort()
        self.textProxyPort.SetValue(str(self.proxyPort))
        simulation = FanbotConfig.getSimulation()
        self.handleSelection(simulation)
        if simulation:
            self.buttonConnectSimulOnButtonClick(None)
        else:
            self.buttonConnectRealOnButtonClick(None)