# -*- coding: utf-8 -*- import thriftpy from thrift_connector import ClientPool, ThriftPyCyClient service = thriftpy.load("pingpong_app/pingpong.thrift") pool = ClientPool( service.PingService, 'localhost', 8880, connction_class=ThriftPyCyClient ) print "Sending Ping..." print "Receive:", pool.ping() print "Winning the match..." print "Receive:", pool.win()
# -*- coding: utf-8 -*- import thriftpy from thrift_connector import ClientPool, ThriftPyCyClient service = thriftpy.load("pingpong_app/pingpong.thrift") pool = ClientPool(service.PingService, 'localhost', 8880, connction_class=ThriftPyCyClient) print "Sending Ping..." print "Receive:", pool.ping() print "Winning the match..." print "Receive:", pool.win()
# -*- coding: utf-8 -*- from __future__ import print_function import thriftpy from thrift_connector import ClientPool, ThriftPyCyClient service = thriftpy.load("pingpong_app/pingpong.thrift") pool = ClientPool(service.PingService, 'localhost', 8880, connection_class=ThriftPyCyClient) print("Sending Ping...") print("Receive:", pool.ping()) print("Winning the match...") print("Receive:", pool.win())
# -*- coding: utf-8 -*- from __future__ import print_function from pingpong_app.pingpong_sdk.pingpong import PingService from thrift_connector import ClientPool, ThriftClient pool = ClientPool( PingService, 'localhost', 8880, connection_class=ThriftClient ) print("Sending Ping...") print("Receive:", pool.ping()) print("Winning the match...") print("Receive:", pool.win())