90 | | |
91 | | class MyXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer) : |
| 92 | |
| 93 | class ThreadedXMLRPCServer(SocketServer.ThreadingTCPServer, SimpleXMLRPCServer.SimpleXMLRPCDispatcher) : |
| 94 | """Base class to have a threaded XMLRPC Server.""" |
| 95 | def __init__(self, addr, requestHandler=SimpleXMLRPCServer.SimpleXMLRPCRequestHandler, logRequests=False) : |
| 96 | """Imitate what is in SimpleXMLRPCServer.py but with a threaded TCP server instead.""" |
| 97 | self.logRequests = logRequests |
| 98 | SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__(self) |
| 99 | SocketServer.ThreadingTCPServer.__init__(self, addr, requestHandler) |
| 100 | |
| 101 | class MyXMLRPCServer(ThreadedXMLRPCServer) : |
95 | | SimpleXMLRPCServer.SimpleXMLRPCServer.__init__(self, \ |
96 | | ('0.0.0.0', options.port), \ |
97 | | SimpleXMLRPCServer.SimpleXMLRPCRequestHandler, \ |
98 | | options.debug) |
| 105 | ThreadedXMLRPCServer.__init__(self, \ |
| 106 | ('0.0.0.0', options.port), \ |
| 107 | SimpleXMLRPCServer.SimpleXMLRPCRequestHandler, \ |
| 108 | options.debug) |