4 from resources.lib.common import log
5 from resources.lib.MSLHttpRequestHandler import MSLHttpRequestHandler
8 Handler = MSLHttpRequestHandler
9 SocketServer.TCPServer.allow_reuse_address = True
10 server = SocketServer.TCPServer(('127.0.0.1', PORT), Handler)
11 server.server_activate()
14 if __name__ == '__main__':
15 monitor = xbmc.Monitor()
16 thread = threading.Thread(target=server.serve_forever)
20 while not monitor.abortRequested():
21 if monitor.waitForAbort(5):
28 log("Stopped MSL Service")