有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

C++协议将缓冲区定义为多个。原始文件

我想在另一个协议文件中包含一个协议定义文件。例如:

// base.proto:
message P_EndPoint {
  required int32 id = 1;
  required string host = 2;
  required int32 port = 3;
}

然后在另一个文件中:

communication.proto:
// somehow include `base.proto'
// ...
message P_CommunicationProtocol {
  required CP_MessageType type = 1;
  optional int32 id = 2;
  optional P_EndPoint identity = 3;
  repeated P_EndPoint others = 4;
}
// ...

(注意:developers.google.com在我的语言环境中不可用)


共 (1) 个答案