示例#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()
示例#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()
示例#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
示例#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
示例#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()
示例#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()
示例#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()
示例#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()
示例#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()
示例#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()