From 7007ebe7710d29f26696de16407beced6dbacb6c Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 21 Sep 2012 23:27:12 +0200 Subject: added websocket backend, removed thrift --- module/remote/thriftbackend/Protocol.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 module/remote/thriftbackend/Protocol.py (limited to 'module/remote/thriftbackend/Protocol.py') diff --git a/module/remote/thriftbackend/Protocol.py b/module/remote/thriftbackend/Protocol.py deleted file mode 100644 index c42d01459..000000000 --- a/module/remote/thriftbackend/Protocol.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- - -from thrift.protocol import TBinaryProtocol - -class Protocol(TBinaryProtocol.TBinaryProtocol): - def writeString(self, str): - try: - str = str.encode("utf8", "ignore") - except Exception, e: - pass - - self.writeI32(len(str)) - self.trans.write(str) - - def readString(self): - len = self.readI32() - str = self.trans.readAll(len) - try: - str = str.decode("utf8", "ignore") - except: - pass - - return str - - -class ProtocolFactory(TBinaryProtocol.TBinaryProtocolFactory): - - def getProtocol(self, trans): - prot = Protocol(trans, self.strictRead, self.strictWrite) - return prot \ No newline at end of file -- cgit v1.2.3