当前位置:网站首页>thrift简单应用
thrift简单应用
2022-04-21 16:40:00 【zqwlearning】
来自:Linux基础课
6. thrift
创建match-server:
cd thrift_lesson/match_system/src
thrift -r --gen cpp ../../thrift/match.thrift
mv gen-cpp match_server
rm match_server/Match_server.skeleton.cpp
创建save-client:
cd thrift_lesson/match_system/src
thrift -r --gen cpp ../../thrift/save.thrift
mv gen-cpp save_client
rm save_client/Save_server.skeleton.cpp
创建main.cpp,源代码在这里
编译:
g++ -c main.cpp match_server/*.cpp save_client/*.cpp
链接:
g++ *.o -o main -lthrift -pthread
启动服务:
./main
创建match-client:
cd thrift_lesson/game/src
thrift -r --gen py ../../thrift/match.thrift
mv gen-py match_client
创建client.py,内容在这里
执行client.py:
python3 client.py
版权声明
本文为[zqwlearning]所创,转载请带上原文链接,感谢
https://zqwlearning.blog.csdn.net/article/details/122921674
边栏推荐
- Online dictionary website
- OJ daily practice - grade score
- Ctrip master XSS vulnerability
- Invalid bound statement (not found)
- 手把手教你基于LXD用OAK-D和ROS noetic做ORB SLAM3
- 手机里的NPU可以起到什么作用
- OJ每日一练——字符个数
- 苹果A13处理器在技术上有哪些创新?
- es6如何判断数组是否重复
- Are you sure you don't want to see it yet? Managing your code base in this way is both convenient and worry free
猜你喜欢

2022 bone conduction earphone ranking, the best bone conduction earphone recommended

Are you sure you don't want to see it yet? Managing your code base in this way is both convenient and worry free

Haotian Xuhui signed a contract with Changyang technology to jointly build a new ecosystem of industrial Internet security

SQL--数据库的操作(DDL,DML,DQL)+使用命令查看当前数据库的存储位置(数据库版本查询)

How where used list in SAP GUI is implemented

2022 number two real problem

Invalid bound statement (not found)

IvorySQL亮相于PostgresConf SV 2022 硅谷Postgres大会

Inconsistent length of input and select in elmentui form

What kind of earphone doesn't hurt your ears? Bone conduction earphone for non ear wearing
随机推荐
多核和多CPU編程——任務調度
网易的XSS
Jianmu continuous integration platform v2 3.0 release
SQL injection vulnerability exists in a channel of Sogou
(11) definition of macro language - (C.4)
Program design TIANTI race l3-28 Sensen tourism (even if you think of multiset)
SQL--数据库的操作(DDL,DML,DQL)+使用命令查看当前数据库的存储位置(数据库版本查询)
4.25 unlock openharmony technology day! The annual event is about to open!
Project training 2022-4-21 (flame grass)
打卡:4.21 C语言篇 -(1)初识C语言 - (11)关键字register,#define定义的宏
ES6 how to determine whether an array is repeated
Yunna: computer room asset management system web version, application of equipment asset information management
elmentUI表单中input 和select长度不一致问题
拓荆科技登陆科创板:募资约23亿元,总市值突破100亿元
What are the similarities and differences between LCD and OLED screens
C sliding verification code | puzzle verification | slidecaptcha
What is the future development trend of mobile processor
What role can NPU in mobile phone play
Function stack frame creation and destruction (understand)
优炫数据库中标北京市应急管理部消防产品合格评定中心项目