syntax = "proto3"; package aiot; import "aiot_common.proto"; enum RequestType{ Async = 0; sync = 1; } // 请求的body体 message BusinessReq { string topic = 1; string authorization = 2; string ip = 3; string port = 4; RequestType type = 5; bytes req = 6; } // 响应的body体 message BusinessReply { int32 code = 1; string msg = 2; bool success = 3; bytes data = 4; } service AiotService { rpc GetBusiness(BusinessReq) returns (BusinessReply){} rpc SendAiotReq(Protocol) returns (Protocol){} }