1

I recently installed gRPC (C++), and I have a question regarding the .proto files. Suppose that I want one of the members of the Request to be a custom user defined C++ class, maybe like so:

message clientRequest {
    userClass user_class = 1;
    int nothing_special = 2;
}

and here userClass is a C++ class which is custom defined. If I want do something like this, how do I let gRPC know that I have such a custom class which I want it to use? Where should I define such a class? I figured that it uses proto3 but couldn't find much in the proto3 docs, and I have no prior experience with proto3 at all.

Thanks in advance.

Test Zero
  • 35
  • 1
  • 4
  • You cannot do that. You'll need to serialize all the data within that class somehow – al3c Apr 06 '20 at 14:05

0 Answers0