Thank you for your helpful answer. I will check another method for this problem. like as wrapping protobuf data in packet header... etc...
Have a nice day Jon Skeet. :) 2016년 11월 11일 금요일 오전 8시 0분 55초 UTC+9, Jon Skeet 님의 말: > There's no way of doing this - it's not a C# limitation, but just the way > that protobufs work. > > If you don't know what type of message you'll be receiving, you might want > to use Any, which includes a type URL with the data. > One way or another, if you receive a message which could be one of > multiple types, you need to put something in place to tell you what that is > - maybe a wrapper oneof message, or an Any, or something out-of-band... but > the data is *just* the data. > > Jon > > > On Wednesday, 9 November 2016 18:54:57 UTC, KMG wrote: >> >> hello! dears. >> >> >> i recieved some byte[] from server. >> >> i need to use MessageParser for deserializing them. >> >> >> but I can't determine type of byte[]. >> >> >> somebody can solve this problem? >> >> >> ex) >> >> byte[] recievedBytes = ....; >> >> >> MyProtobufClass.Parser.ParseFrom(recievedBytes); >> >> >> but i can't sure recievedBytes are MyProtobufClass... >> >> >> please. help me. >> > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
