03 2022 档案

摘要:目录结构 编译脚本build.sh if [ -d "./proto_code" ];then rm -rf ./proto_code fi mkdir ./proto_code protoc -I ./ --grpc_out=./proto_code --plugin=protoc-gen-grp 阅读全文
posted @ 2022-03-23 17:20 Wangtn 阅读(2900) 评论(0) 推荐(0) 编辑
摘要:自己动手写一个grpc c++的demo,自己写protobuf文件,编译文件和源码 实现一个最简单的grpc功能,客户端向服务端发送一个消息,服务端接收到消息后把结果返回给客户端 demo的文件结构 首先定义proto文件 官方教程:https://developers.google.com/pr 阅读全文
posted @ 2022-03-22 18:05 Wangtn 阅读(5117) 评论(2) 推荐(0) 编辑
摘要:线程库<pthread.h> 获取程序的进程号 getpid() cout<<"main function pid:"<<getpid()<<endl; 获取线程函数的线程号 #include <sys/types.h> cout<<"route thread function pid:"<<get 阅读全文
posted @ 2022-03-10 09:41 Wangtn 阅读(272) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <unistd.h> #include <string.h> #include <dirent.h> #include <stdlib.h> #include <limits.h> int main(void) { DIR *dir; stru 阅读全文
posted @ 2022-03-09 15:43 Wangtn 阅读(517) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示