I forgot to mention that the file they sent us is using Protocol Buffers 2.

BR,

A terça-feira, 13 de outubro de 2020 à(s) 15:25:07 UTC+2, Carlos Pereira 
escreveu:

> Hi,
>
> Currently I'm working with ProtoBuf at work. There's a client device that 
> sends us messages using ProtoBuf, so we can't change the protocol. The 
> first 3 bytes is the length of the ProtoBuf message with big endian bytes 
> order and then after that is the message itself. However, the .proto file 
> they sent us defines multiple types of messages.
>
> I'm using a CodedInputStream to first read the length of the serialized 
> message and then read this size.
>
> My problem is that after having bytes of the message I don't know which 
> class inside the protc generated file I should use to call the *parseFrom*
> .
>
> Any idea?
>
>
> Best Regards,
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/94523e6f-cc14-4928-a4f6-eb3d6a7f37e8n%40googlegroups.com.

Reply via email to