diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 21:59:10 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 21:59:10 +0100 |
commit | 8e7d14bae4d3c836f029a1235eb227380acc3f75 (patch) | |
tree | ebd0679642cccb994e70a89a106b394189cb28bc /pyload/remote/SocketBackend.py | |
parent | Merge branch 'stable' into 0.4.10 (diff) | |
download | pyload-8e7d14bae4d3c836f029a1235eb227380acc3f75.tar.xz |
Fix plugins to work on 0.4.10
Diffstat (limited to 'pyload/remote/SocketBackend.py')
-rw-r--r-- | pyload/remote/SocketBackend.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pyload/remote/SocketBackend.py b/pyload/remote/SocketBackend.py new file mode 100644 index 000000000..a1c885347 --- /dev/null +++ b/pyload/remote/SocketBackend.py @@ -0,0 +1,25 @@ +# -*- 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() |