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)
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()
def __init__(self): self.logger = get_logger() self._conn = None self._min_url_length = None self._set_min_url_lenth()
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
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)
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)