MCPcopy
hub / github.com/pyload/pyload / setup

Method setup

module/remote/ThriftBackend.py:31–53  ·  view source on GitHub ↗
(self, host, port)

Source from the content-addressed store, hash-verified

29
30class ThriftBackend(BackendBase):
31 def setup(self, host, port):
32 processor = Processor(self.core.api)
33
34 key = None
35 cert = None
36
37 if self.core.config['ssl']['activated']:
38 if exists(self.core.config['ssl']['cert']) and exists(self.core.config['ssl']['key']):
39 self.core.log.info(_("Using SSL ThriftBackend"))
40 key = self.core.config['ssl']['key']
41 cert = self.core.config['ssl']['cert']
42
43 transport = ServerSocket(port, host, key, cert)
44
45
46# tfactory = TransportFactoryCompressed()
47 tfactory = TransportFactory()
48 pfactory = ProtocolFactory()
49
50 self.server = TServer.TThreadedServer(processor, transport, tfactory, pfactory)
51 #self.server = TNonblockingServer.TNonblockingServer(processor, transport, tfactory, pfactory)
52
53 #server = TServer.TThreadPoolServer(processor, transport, tfactory, pfactory)
54
55 def serve(self):
56 self.server.serve()

Callers

nothing calls this directly

Calls 6

ProcessorClass · 0.90
ServerSocketClass · 0.90
TransportFactoryClass · 0.90
ProtocolFactoryClass · 0.90
existsFunction · 0.85
_Function · 0.50

Tested by

no test coverage detected