(self, config, port, address='', server_version=version.NAMEVERSION)
Raises ProxyServerError if there's a startup problem.
Raises ProxyServerError if there's a startup problem.
Raises ProxyServerError if there s a startup problem .
def __init__(self, config, port, address='', server_version=version.NAMEVERSION):
        """
            Raises ProxyServerError if there's a startup problem.
        """
        self.config, self.port, self.address = config, port, address
        self.server_version = server_version
        try:
            tcp.TCPServer.__init__(self, (address, port))
        except socket.error, v:
            raise ProxyServerError('Error starting proxy server: ' + v.strerror)
        self.channel = None
        self.apps = AppRegistry()
        if config.app:
            self.apps.add(
                app.mapp,
                APP_DOMAIN,
                80
            )
            self.apps.add(
                app.mapp,
                APP_IP,
                80
            )
def __init__ ( self , config , port , address = '' , server_version = version . NAMEVERSION ) : self . config , self . port , self . address = config , port , address self . server_version = server_version try : tcp . TCPServer . __init__ ( self , ( address , port ) ) except socket . error , v : raise ProxyServerError ( 'Error starting proxy server: ' + v . strerror ) self . channel = None self . apps = AppRegistry ( ) if config . app : self . apps . add ( app . mapp , APP_DOMAIN , 80 ) self . apps . add ( app . mapp , APP_IP , 80 )