thrift 自定義返回類型示例

thrift.txt文件

內容如下;
定義了一個叫做豆豆的類型, 然後簡單的示例如下:

namespace cpp xxx
namespace java com.xxx

struct Doudou{
 1:bool success=true
 2:i32 code
 3:string msg="",
}

service ThriftService{
    string test(1:string para)
	Doudou hello(1:string para1,2:string para2)
}

生成命令:

thrift.exe -gen cpp thrift.txt
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章