diff options
Diffstat (limited to 'pyload/remote/SocketBackend.py')
-rw-r--r-- | pyload/remote/SocketBackend.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pyload/remote/SocketBackend.py b/pyload/remote/SocketBackend.py new file mode 100644 index 000000000..8b74d19ff --- /dev/null +++ b/pyload/remote/SocketBackend.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +import SocketServer + +from pyload.manager.Remote import BackendBase + + +class RequestHandler(SocketServer.BaseRequestHandler): + + def setup(self): + pass + + + def handle(self): + print self.request.recv(1024) + + +class SocketBackend(BackendBase): + + def setup(self, host, port): + # local only + self.server = SocketServer.ThreadingTCPServer(("localhost", port), RequestHandler) + + + def serve(self): + self.server.serve_forever() |