Exemplo n.º 1
0
 def start(self, host, port):
     logger.info('HTTP server started on: {0}'.format((host, port)))
     self.cmd_responder = CommandResponder(host, port, self.template,
                                           self.template_directory)
     self.cmd_responder.httpd.allow_reuse_address = True
     self.server_port = self.cmd_responder.server_port
     self.cmd_responder.serve_forever()
Exemplo n.º 2
0
 def start(self, host, port):
     logger.info("HTTP server started on: %s", (host, port))
     self.cmd_responder = CommandResponder(
         host, port, self.template,
         os.path.join(self.template_directory, "http"))
     self.cmd_responder.httpd.allow_reuse_address = True
     self.server_port = self.cmd_responder.server_port
     self.cmd_responder.serve_forever()
Exemplo n.º 3
0
    def __init__(self, host, port, template, docpath):
        self.host = host
        self.port = port
        self.docpath = docpath

        self.cmd_responder = CommandResponder(host, port, template, docpath)
        self.cmd_responder.httpd.allow_reuse_address = True
        self.server_port = self.cmd_responder.server_port
Exemplo n.º 4
0
    def __init__(self, host, port, template, docpath):
        self.host = host
        self.port = port
        self.docpath = docpath

        self.cmd_responder = CommandResponder(host, port, template, docpath)
        self.cmd_responder.httpd.allow_reuse_address = True
        self.server_port = self.cmd_responder.server_port
Exemplo n.º 5
0
class HTTPServer(object):
    def __init__(self, template, template_directory, args):
        self.template = template
        self.template_directory = template_directory
        self.server_port = None
        self.cmd_responder = None

    def start(self, host, port):
        logger.info('HTTP server started on: {0}'.format((host, port)))
        self.cmd_responder = CommandResponder(host, port, self.template, self.template_directory)
        self.cmd_responder.httpd.allow_reuse_address = True
        self.server_port = self.cmd_responder.server_port
        self.cmd_responder.serve_forever()

    def stop(self):
        if self.cmd_responder:
            self.cmd_responder.stop()
Exemplo n.º 6
0
 def start(self, host, port):
     logger.info('HTTP server started on: %s', (host, port))
     print 'self.template: {0}'.format(self.template)
     print 'self.template_directory: {0}'.format(self.template_directory)
     self.cmd_responder = CommandResponder(host, port, self.template, os.path.join(self.template_directory, 'http'))
     self.cmd_responder.httpd.allow_reuse_address = True
     self.server_port = self.cmd_responder.server_port
     self.cmd_responder.serve_forever()
Exemplo n.º 7
0
class HTTPServer(object):
    def __init__(self, template, template_directory, args):
        self.template = template
        self.template_directory = template_directory
        self.server_port = None
        self.cmd_responder = None

    def start(self, host, port):
        logger.info('HTTP server started on: %s', (host, port))
        self.cmd_responder = CommandResponder(host, port, self.template, os.path.join(self.template_directory, 'http'))
        self.cmd_responder.httpd.allow_reuse_address = True
        self.server_port = self.cmd_responder.server_port
        self.cmd_responder.serve_forever()

    def stop(self):
        if self.cmd_responder:
            self.cmd_responder.stop()
Exemplo n.º 8
0
class HTTPServer(object):
    def __init__(self, host, port, template, docpath):
        self.host = host
        self.port = port
        self.docpath = docpath

        self.cmd_responder = CommandResponder(host, port, template, docpath)
        self.cmd_responder.httpd.allow_reuse_address = True
        self.server_port = self.cmd_responder.server_port

    def start(self):
        if self.cmd_responder:
            logger.info('HTTP server started on: {0}'.format(
                (self.host, self.port)))
            self.cmd_responder.serve_forever()

    def stop(self):
        if self.cmd_responder:
            self.cmd_responder.stop()

    def shutdown(self):
        if self.cmd_responder:
            self.cmd_responder.httpd.shutdown()
Exemplo n.º 9
0
class HTTPServer(object):

    def __init__(self, host, port, template, docpath):
        self.host = host
        self.port = port
        self.docpath = docpath

        self.cmd_responder = CommandResponder(host, port, template, docpath)
        self.cmd_responder.httpd.allow_reuse_address = True
        self.server_port = self.cmd_responder.server_port

    def start(self):
        if self.cmd_responder:
            logger.info('HTTP server started on: {0}'.format((self.host, self.port)))
            self.cmd_responder.serve_forever()

    def stop(self):
        if self.cmd_responder:
            self.cmd_responder.stop()

    def shutdown(self):
        if self.cmd_responder:
            self.cmd_responder.httpd.shutdown()
Exemplo n.º 10
0
 def start(self, host, port):
     logger.info('HTTP server started on: {0}'.format((host, port)))
     self.cmd_responder = CommandResponder(host, port, self.template, self.template_directory)
     self.cmd_responder.httpd.allow_reuse_address = True
     self.server_port = self.cmd_responder.server_port
     self.cmd_responder.serve_forever()