这部分代码是用于客户端请求服务器,它由thrift compiler自动生成。
使用与前一篇一样的例子:thrift文件
/** * gateway service definition. */service GatewayService{ i32 GetCompereCount( 1:i32 channel_id ), list< i32 > GetCompereList( 1:i32 channel_id, 2:i32 from, 3:i32 range ) }
由thrift compiler自动生成的客户端代码:
class GatewayServiceClient : virtual public GatewayServiceIf {
public:
GatewayServiceClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot)......
阅读全文