def __init__(self, API, host="localhost", port=8000): threading.Thread.__init__(self) verbosity = False if (config.VERBOSE): verbosity = True self._Server = BetterXMLServer((host, port), logRequests=verbosity, allow_none=True) #self._Server = SimpleXMLRPCServer((host, port), requestHandler=XMLRPCHandler, logRequests=verbosity) self._Server.register_introspection_functions() self._Server.register_instance(API) self._Server.register_function(self.stop, "stop") self._Server.register_function(self.is_alive, "is_alive")
def __init__(self, API, host = "localhost", port = 50000): threading.Thread.__init__(self) verbosity = False if (config.VERBOSE): verbosity = True self._Server = BetterXMLServer ((host, port), logRequests = verbosity, allow_none = True) #self._Server = SimpleXMLRPCServer((host, port), requestHandler=XMLRPCHandler, logRequests=verbosity) self._Server.register_introspection_functions() self._Server.register_instance(API) self._Server.register_function(self.stop, "stop") self._Server.register_function(self.is_alive, "is_alive")
class XMLRPC(threading.Thread): _Server = None def __init__(self, API, host = "localhost", port = 50000): threading.Thread.__init__(self) verbosity = False if (config.VERBOSE): verbosity = True self._Server = BetterXMLServer ((host, port), logRequests = verbosity, allow_none = True) #self._Server = SimpleXMLRPCServer((host, port), requestHandler=XMLRPCHandler, logRequests=verbosity) self._Server.register_introspection_functions() self._Server.register_instance(API) self._Server.register_function(self.stop, "stop") self._Server.register_function(self.is_alive, "is_alive") def run(self): log.write("Launching XML-RPC server [" + str(self._Server.server_address[0]) + ":" + str(self._Server.server_address[1]) + "]") self._Server.serve_forever() def stop(self): log.write("XML-RPC Server stopped") self._Server.shutdown() def is_alive(self): return True
class XMLRPC(threading.Thread): _Server = None def __init__(self, API, host="localhost", port=8000): threading.Thread.__init__(self) verbosity = False if (config.VERBOSE): verbosity = True self._Server = BetterXMLServer((host, port), logRequests=verbosity, allow_none=True) #self._Server = SimpleXMLRPCServer((host, port), requestHandler=XMLRPCHandler, logRequests=verbosity) self._Server.register_introspection_functions() self._Server.register_instance(API) self._Server.register_function(self.stop, "stop") self._Server.register_function(self.is_alive, "is_alive") def run(self): log.write("Launching XML-RPC server [" + str(self._Server.server_address[0]) + ":" + str(self._Server.server_address[1]) + "]") self._Server.serve_forever() def stop(self): log.write("XML-RPC Server stopped") self._Server.shutdown() def is_alive(self): return True