diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
commit | ce1c2b6b05c08b669357947e61ae40efce7fc50f (patch) | |
tree | 0b5f7996960cf35c4eface53a89eba18a37519b7 /module/remote/SocketBackend.py | |
parent | Fix filename case (diff) | |
download | pyload-ce1c2b6b05c08b669357947e61ae40efce7fc50f.tar.xz |
module temp
Diffstat (limited to 'module/remote/SocketBackend.py')
-rw-r--r-- | module/remote/SocketBackend.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/module/remote/SocketBackend.py b/module/remote/SocketBackend.py new file mode 100644 index 000000000..a1c885347 --- /dev/null +++ b/module/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() |