Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thrift 多参数支持 #247

Closed
redkongdong opened this issue Jul 20, 2022 · 2 comments
Closed

Thrift 多参数支持 #247

redkongdong opened this issue Jul 20, 2022 · 2 comments

Comments

@redkongdong
Copy link

请教一下现在thrift 多参数支持吗

原生thrift接口参数填写为多个

@holmes1412
Copy link
Contributor

hi~ 是支持的,可以参考下tutorial的echo_thrift.thrift里:

service Example {
	EchoResult Echo(1:string message, 2:string name);
}

那么生成代码echo_thrift.srpc.h就会包含以下多参数接口:

class SRPCClient : public srpc::SRPCClient                                      
{                                                                               
public:                                                                         
    void Echo(EchoResult& _return, const std::string& message, const std::string& name);
    void send_Echo(const std::string& message, const std::string& name);        
    void recv_Echo(EchoResult& _return);
    ...
}

@redkongdong
Copy link
Author

感恩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants