下拉刷新
项目详情
navbar_avatar分享
repo_avatar
HelloGitHub 评分
0 人评分
搜狗基于 C++ Workflow 的高性能 RPC 框架
开源Apache-2.0
认领
收藏
分享
2.1k
星数
中文
C++
主语言
活跃
19
贡献者
30
Issues
组织
0.10.3
最新版本
408
Forks
Apache-2.0
协议
更多
srpc image
搜狗基于 C++ Workflow 的高性能 RPC 框架。与 thrift/brpc 协议兼容,支持 protobuf/thrift IDL一键迁移,核心代码量仅 1w 行。示例代码: ```c++ class ExampleServiceImpl : public Example::Service { public: void Echo(EchoRequest *request, EchoResponse *response, RPCContext *ctx) override { response->set_message("Hi, " + request->name()); } }; int main() { SRPCHttpServer server; ExampleServiceImpl impl; server.add_service(&impl); server.start(1412); pause(); server.stop(); return 0; } 访问: curl 127.0.0.1:1412/Example/Echo -H 'Content-Type: application/json' -d '{message:"from curl",name:"CURL"}' ```
收录于:
第 56 期

评论

评分:
暂无精选评论