summaryrefslogtreecommitdiffstats
path: root/pyload/remote/thriftbackend/Transport.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/remote/thriftbackend/Transport.py')
-rw-r--r--pyload/remote/thriftbackend/Transport.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pyload/remote/thriftbackend/Transport.py b/pyload/remote/thriftbackend/Transport.py
index 7ecb16746..1d3d81718 100644
--- a/pyload/remote/thriftbackend/Transport.py
+++ b/pyload/remote/thriftbackend/Transport.py
@@ -3,6 +3,7 @@
from thrift.transport.TTransport import TBufferedTransport
from thrift.transport.TZlibTransport import TZlibTransport
+
class Transport(TBufferedTransport):
DEFAULT_BUFFER = 4096
@@ -12,6 +13,7 @@ class Transport(TBufferedTransport):
self.handle = trans.handle
self.remoteaddr = trans.handle.getpeername()
+
class TransportCompressed(TZlibTransport):
DEFAULT_BUFFER = 4096
@@ -21,12 +23,14 @@ class TransportCompressed(TZlibTransport):
self.handle = trans.handle
self.remoteaddr = trans.handle.getpeername()
+
class TransportFactory(object):
def getTransport(self, trans):
buffered = Transport(trans)
return buffered
+
class TransportFactoryCompressed(object):
_last_trans = None
_last_z = None