diff options
Diffstat (limited to 'module/remote')
-rw-r--r-- | module/remote/ThriftBackend.py | 6 | ||||
-rw-r--r-- | module/remote/socketbackend/__init__.py | 1 | ||||
-rw-r--r-- | module/remote/thriftbackend/Socket.py | 6 | ||||
-rw-r--r-- | module/remote/thriftbackend/pyload.thrift | 4 |
4 files changed, 8 insertions, 9 deletions
diff --git a/module/remote/ThriftBackend.py b/module/remote/ThriftBackend.py index b4a2bb25e..f8edc8dd6 100644 --- a/module/remote/ThriftBackend.py +++ b/module/remote/ThriftBackend.py @@ -46,11 +46,11 @@ class ThriftBackend(BackendBase): # tfactory = TransportFactoryCompressed() tfactory = TransportFactory() pfactory = ProtocolFactory() - + self.server = TServer.TThreadedServer(processor, transport, tfactory, pfactory) #self.server = TNonblockingServer.TNonblockingServer(processor, transport, tfactory, pfactory) - + #server = TServer.TThreadPoolServer(processor, transport, tfactory, pfactory) - + def serve(self): self.server.serve() diff --git a/module/remote/socketbackend/__init__.py b/module/remote/socketbackend/__init__.py index de6d13128..4b31e848b 100644 --- a/module/remote/socketbackend/__init__.py +++ b/module/remote/socketbackend/__init__.py @@ -1,2 +1 @@ __author__ = 'christian' -
\ No newline at end of file diff --git a/module/remote/thriftbackend/Socket.py b/module/remote/thriftbackend/Socket.py index 2243f9df2..b9fa7edbf 100644 --- a/module/remote/thriftbackend/Socket.py +++ b/module/remote/thriftbackend/Socket.py @@ -26,14 +26,14 @@ class SecureSocketConnection: def accept(self): connection, address = self.__dict__["connection"].accept() return SecureSocketConnection(connection), address - + def send(self, buff): try: return self.__dict__["connection"].send(buff) except WantReadError: sleep(0.1) return self.send(buff) - + def recv(self, buff): try: return self.__dict__["connection"].recv(buff) @@ -86,7 +86,7 @@ class Socket(TSocket): buff = '' else: raise - + if not len(buff): raise TTransportException(type=TTransportException.END_OF_FILE, message='TSocket read 0 bytes') return buff diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift index 1542e651a..7f4560ecb 100644 --- a/module/remote/thriftbackend/pyload.thrift +++ b/module/remote/thriftbackend/pyload.thrift @@ -297,13 +297,13 @@ service Pyload { //events list<EventInfo> getEvents(1: string uuid) - + //accounts list<AccountInfo> getAccounts(1: bool refresh), list<string> getAccountTypes() void updateAccount(1: PluginName plugin, 2: string account, 3: string password, 4: map<string, string> options), void removeAccount(1: PluginName plugin, 2: string account), - + //auth bool login(1: string username, 2: string password), UserData getUserData(1: string username, 2:string password), |