[protobuf] Re: C++ Proto3: Parsing messages from the TCP stream

2023-01-16 Thread Vimla Sharma
Thank you, it worked. I used "any". google::protobuf::Any any; rc = any.ParseFromArray(ptr, len); if (!rc) { return false; } std::string data; if (any.Is()) { On Sunday, January 15, 2023 at 4:15:08 AM UTC-5 nga...@gmail.com wrote: > Without seeing the actual proto on

[protobuf] Re: C++ Proto3: Parsing messages from the TCP stream

2023-01-15 Thread Michael Ngarimu
Without seeing the actual proto one has to make some assumptions. Assuming MessageType1-5 are all intended to be "top-level" messages, here are some possibilities I can think of; others may more/better ideas. 1. Attempt to deserialize each type 1. I think this might still succeed if th