RPC框架 - thrift 客户端

   
-------客户端程序 ------

下载
    下载 thrift 源代码包
    下载 thrift 的bin包

准备描述文件(使用源代码包的示例文件)
    \thrift-0.10.0\tutorial\shared.thrift
    \thrift-0.10.0\tutorial\tutorial.thrift

根据描述文件生成代码
    thrift-0.10.0.exe -r -o lib_client --gen php idl-dir/tutorial.thrift

从thrift源代码包中拷贝 php的库
    \thrift-0.10.0\lib\php\lib
    
编写客户端代码 (使用源代码包的示例文件、并修改)
    \thrift-0.10.0\tutorial\php\PhpClient.php

posted on 2017-03-17 17:13  周~~  阅读(302)  评论(0编辑  收藏  举报

导航