最佳答案
I'm trying to describe an RPC service using Google's Protocol Buffers
service WhoamiService {
rpc WhoAreYou() returns (Whoami) {}
}
message Whoami {
optional bytes request_id = 1;
optional string hostname = 2;
optional string message = 3;
}
When I try to compile this definition, I get an error Expected type name pointing to the WhoAreYou() piece.
It works fine if I replace WhoAreYou() with WhoAreYou(Whoami), but in this case, the method does not need any parameters.. Is there a way to do this or is it simply not supported?