首页 > thrift的一些疑问

thrift的一些疑问

thrift --gen php test.thrift
在执行生成的php的代码中

//gen-php/Test.php
use Thrift\Base\TBase;
use Thrift\Type\TType;
use Thrift\Type\TMessageType;
use Thrift\Exception\TException;
use Thrift\Exception\TProtocolException;
use Thrift\Protocol\TProtocol;
use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Exception\TApplicationException;

这些是什么意思?
不知道大家有没有thrift相关的文档可以看呢?发现资料好少。谢谢!


thrift源码里写namespace php ...会定义命名空间。你这里是导入。

关于资料,我正想整理整理。我参考的资料大多是官网的一些概念和例子。其实会了IDL,明白了概念,会使用生成代码的几个对象(Processer,Server,Client(在生成的代码内))就算是入门了。如果想进一步,可以阅读源代码。

【热门文章】
【热门文章】