Answer the question
In order to leave comments, you need to log in
How to Parse Strings into a Java Protobuf Object?
Python + Java client/server application, exchange messages over a socket using protobuf.
Protobuf file structure:
package tutorial;
option java_package = "com.example.tutorial";
option java_outer_classname = "mess";
message request {
required float a = 1;
required float b = 2;
required float c = 3;
}
message response {
optional float x = 1;
optional string mess = 2;
}
The python client creates a request object then sends it to a socket serialized to a string CODE - 'sock.send(Request.SerializeToString())'
How on the Java server to parse this string, which was accepted into the socket? Need to create a request object?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question