def openRpcListener(self):
try:
# Make socket
transport = TSocket.TSocket(self.ipAddress, self.portNumber)
# Buffering is critical. Raw sockets are very slow
transport = TTransport.TBufferedTransport(transport)
# Wrap in a protocol
protocol = TBinaryProtocol.TBinaryProtocol(transport)
# Create a client to use the protocol encoder
client = Client(protocol)
# Connect!
transport.open()
logging.info("STARTED connection to SDK via RPC thrift")
return client
except Exception as e:
logging.info("Error: Couldn't open the RpcListener: " + str(e))
self.killRpcAgent()
raise WWTypes.WPWithinGeneralException("Error: Couldn't open the RpcListener", e)
WPWithinWrapperImpl.py 文件源码
python
阅读 38
收藏 0
点赞 0
评论 0
评论列表
文章目录