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
阅读全文
摘要:自己动手写一个grpc c++的demo,自己写protobuf文件,编译文件和源码 实现一个最简单的grpc功能,客户端向服务端发送一个消息,服务端接收到消息后把结果返回给客户端 demo的文件结构 首先定义proto文件 官方教程:https://developers.google.com/pr
阅读全文
摘要:线程库<pthread.h> 获取程序的进程号 getpid() cout<<"main function pid:"<<getpid()<<endl; 获取线程函数的线程号 #include <sys/types.h> cout<<"route thread function pid:"<<get
阅读全文
摘要:#include <stdio.h> #include <unistd.h> #include <string.h> #include <dirent.h> #include <stdlib.h> #include <limits.h> int main(void) { DIR *dir; stru
阅读全文