Beispiel #1
0
 def thrift_client(self):
     socket = TSocket.TSocket(self.ip, self.port)
     transport = TTransport.TBufferedTransport(socket)
     protocol = TBinaryProtocol.TBinaryProtocolAccelerated(transport)
     client = MapService.Client(protocol)
     transport.open()
     yield client
     transport.close()