protobuffer

protobuffer

 1、扩展名为.proto。

 2、定义一个协议:

  protobuffer_第1张图片

 3、定义一个Service:

  protobuffer_第2张图片

 4、编译器为protoc,使用protoc:

  protobuffer_第3张图片

 5、style:所有的类型名均CamelCase,此外:

  1)message中的字段小写。

  2)enum中的字段大写。

  3)services中的字段CamelCase。

 

你可能感兴趣的:(protobuf)