Example #1
0
 def tsstop(self):
     """
     Stop the client
     """
     if client.server_handle is not None:
         client.stop()
         self.printMsg('Server Stopped')
Example #2
0
	def stop_clients(self, *args):
		self.log.info("stopping grader clients")
		while self.clients:
			client = self.clients.pop()
			client.stop()
			client.join()
		self.log.info("manager done".format(client.queue_name))	
		sys.exit(0)
Example #3
0
def Asynchronous():
  client = client.Client(ip, port)
  client.add_handler(BuzzGeoReportResponse, 20)
  client.add_handler(BuzzGeoFindNeighboursRequestResponse, 21)
  try:
    send_thread = Thread(client)
    send_thread.start()
    client.start()
    client.join()
  except Exception, e:
    print e
    client.stop()
Example #4
0
    def get_name(self):
        global currentServer
        name, ok = QInputDialog.getText(self, 'Input Dialog', 'Enter your name:')
        if ok:
            if name == '':
                self.get_name()
            else:
                self.name = name
                self.sock = connect(self.name, currentServer)

                thread = Thread(target=self.handle_chat)
                thread.start()
        else:
            box = QMessageBox()
            box.setText('Ухади')
            box.exec()
            app.closeAllWindows()
            stop()
Example #5
0
File: .py Project: loqutus/kv
#!/usr/bin/env python
import client

HOST = '::1'
PORT = 1111
BUFFER = 1024

if __name__ == '__main__':
    for i in range(1, 10000):
        client.set_key(str(i), str(i + 1))
        r = client.get_key(str(i))
        if (str(r) == str(i+1)):
            pass
        else:
            print str(i) + '=' + str(r) + ' error'
            exit(1)
    client.stop()

    exit(0)
Example #6
0
 def closeEvent(self, event):
     app.closeAllWindows()
     stop()
     print('sds')
Example #7
0
 def closeEvent(self, event):
     app.closeAllWindows()
     stop()
     self.sock.close()