I generated this proto file using protoc. protoc -I=C:\proto --cpp_out=C:\proto C:\proto\test.proto
syntax = "proto3";
option java_package = "ex.grpc";
package mathtest;
// Defines the service
service MathTest {
// Function invoked to send the request
rpc sendRequest (MathRequest) returns (MathReply) {}
}
// The request message containing requested numbers
message MathRequest {
int32 a = 1;
int32 b = 2;
}
// The response message containing response
message MathReply {
int32 result = 1;
}
The header file that generated this function:
virtual void sendRequest(::PROTOBUF_NAMESPACE_ID::RpcController* controller,
const ::mathtest::MathRequest* request,
::mathtest::MathReply* response,
::google::protobuf::Closure* done);
when the example that I based on override this function like this:
/Status sendRequest(
ServerContext* context,
const MathRequest* request,
MathReply* reply
) override {
What did I did wrong and how I should generate the proto file?