예제 #1
0
 def __init__(self):
     self._host = config.get('telnet', 'host')
     self._port = config.getint('telnet', 'port')
     self._locals = None
     self._logger = get_logger()
     self._telnet_server = TelnetInteractiveConsoleServer(
         self._host, self._port, self._locals)
예제 #2
0
    def __init__(self, shutdown_event):
        host = config.get('http', 'host')
        port = config.getint('http', 'port')

        self._set_address_family(host)
        HTTPServer.__init__(self, (host, port), YuRequestHandler)

        if config.has_option('http', 'hostname'):
            hostname = config.get('http', 'hostname')
            if port != 80:
                hostname = '%s:%s' % (hostname, port)
        else:
            # TODO we could get the hostname from the IP the server is
            # bound to if we want this, for now we use a stupid fallback
            hostname = 'yaturl.net'

        # store important information here to be able to access it in the request handler
        self.hostname = hostname
        self.resolve_clients = config.getboolean('http', 'resolve_clients')
        self.log_ip_activated = config.getboolean('main', 'log_ip_activated')
        self._shutdown = shutdown_event
        self._logger = get_logger()
예제 #3
0
파일: server.py 프로젝트: frlan/yaturl
    def __init__(self, shutdown_event):
        host = config.get('http', 'host')
        port = config.getint('http', 'port')

        self._set_address_family(host)
        HTTPServer.__init__(self, (host, port), YuRequestHandler)

        if config.has_option('http', 'hostname'):
            hostname = config.get('http', 'hostname')
            if port != 80:
                hostname = '%s:%s' % (hostname, port)
        else:
            # TODO we could get the hostname from the IP the server is
            # bound to if we want this, for now we use a stupid fallback
            hostname = 'yaturl.net'

        # store important information here to be able to access it in the request handler
        self.hostname = hostname
        self.resolve_clients = config.getboolean('http', 'resolve_clients')
        self.log_ip_activated = config.getboolean('main', 'log_ip_activated')
        self._shutdown = shutdown_event
        self._logger = get_logger()
예제 #4
0
 def __init__(self):
     self.logger = get_logger()
     self._conn = None
     self._min_url_length = None
     self._set_min_url_lenth()
예제 #5
0
 def __init__(self, host='127.0.0.1', port=7070, locals_=None):
     super(TelnetInteractiveConsoleServer,
           self).__init__(host, port, locals_, select_timeout=0.5)
     self._logger = get_logger()
     self._running = False
예제 #6
0
파일: manager.py 프로젝트: frlan/yaturl
 def __init__(self):
     self._host = config.get("telnet", "host")
     self._port = config.getint("telnet", "port")
     self._locals = None
     self._logger = get_logger()
     self._telnet_server = TelnetInteractiveConsoleServer(self._host, self._port, self._locals)
예제 #7
0
 def __init__(self, request, client_address, server):
     self._db = YuDatabase()
     self._logger = get_logger()
     self._header_only = False
     BaseHTTPRequestHandler.__init__(self, request, client_address, server)
예제 #8
0
파일: server.py 프로젝트: frlan/yaturl
 def __init__(self, host='127.0.0.1', port=7070, locals_=None):
     super(TelnetInteractiveConsoleServer, self).__init__(host, port, locals_, select_timeout=0.5)
     self._logger = get_logger()
     self._running = False
예제 #9
0
 def __init__(self, request, client_address, server):
     self._db = YuDatabase()
     self._logger = get_logger()
     self._header_only = False
     BaseHTTPRequestHandler.__init__(self, request, client_address, server)