操作流程
1)在.proto文件中定义消息格式
2)使用protobuf编译器生成C++类
3)使用C++ API来读写消息
C++编程指导:https://developers.google.com/protocol-buffers/docs/cpptutorial
消息格式
syntax = "proto3"; //指定版本信息,不指定会报错
message Person //message为关键字,作用为定义一种消息类型
{
string name = 1; //姓名
int32 id = 2; //id
string email = 3; //邮件
}