예제 #1
0
파일: httpserver.py 프로젝트: KurSh/peach
    def initialize(self):
        WebSocketFilePublisher.initialize(self)
        # find a port we can bind for our webserver
        self.webserver_port = getUnboundPort()
        self.debug("attempting to bind %i for webserver" % self.webserver_port)
        server = HTTPServer(('0.0.0.0', self.webserver_port), HeaderReflectHandler)
        self._running = True

        # TODO: start the webserver
        def run_server():
            while self._running:
                server.handle_request()

        t = threading.Thread(target=run_server)
        t.daemon = True
        t.start()
예제 #2
0
    def initialize(self):
        WebSocketFilePublisher.initialize(self)
        # find a port we can bind for our webserver
        self.webserver_port = getUnboundPort()
        self.debug("attempting to bind %i for webserver" % self.webserver_port)
        server = HTTPServer(('0.0.0.0', self.webserver_port),
                            HeaderReflectHandler)
        self._running = True

        # TODO: start the webserver
        def run_server():
            while self._running:
                server.handle_request()

        t = threading.Thread(target=run_server)
        t.daemon = True
        t.start()
예제 #3
0
 def finalize(self):
     WebSocketFilePublisher.finalize(self)
     self._running = False
예제 #4
0
파일: httpserver.py 프로젝트: KurSh/peach
 def finalize(self):
     WebSocketFilePublisher.finalize(self)
     self._running = False