예제 #1
0
class TestServer(object):
    def start(self):
        server_address = ('', 8000)
        self.server = HTTPServer(server_address, Handler)
        self.thread = Thread(target=self.server.serve_forever, args=[0.01])
        self.thread.setDaemon(True)
        self.thread.start()

    def stop(self):
        self.server.shutdown()
        self.thread.join()
        self.server.server_close()
예제 #2
0
class TestServer(object):

    def start(self):
        server_address = ('', 8000)
        self.server = HTTPServer(server_address, Handler)
        self.thread = Thread(target=self.server.serve_forever, args=[0.01])
        self.thread.setDaemon(True)
        self.thread.start()

    def stop(self):
        self.server.shutdown()
        self.thread.join()
        self.server.server_close()
예제 #3
0
 def start(self):
     server_address = ('', 8000)
     self.server = HTTPServer(server_address, Handler)
     self.thread = Thread(target=self.server.serve_forever, args=[0.01])
     self.thread.setDaemon(True)
     self.thread.start()
예제 #4
0
 def start(self):
     server_address = ('', 8000)
     self.server = HTTPServer(server_address, Handler)
     self.thread = Thread(target=self.server.serve_forever, args=[0.01])
     self.thread.setDaemon(True)
     self.thread.start()