It appears that the C++ listener code supports multiple types, but assumes
that the correct type can be determined by checking if parsing the
serialized string returns successfully. This is not a reliable way to detect
message types: in fact ParseFromString() only fails if the serialized data
is
If I understand correctly, you are talking about two separate issue.
One is that I use of ParseFromString() is unreliable. The other one
is that I should switch to self describing messages. The latter is
not feasible for now; I receive serialized PB messages that do not
contain their type name,
No, the issue is one and the same. You cannot receive arbitrary serialized
bytes and determine what the message type is. You can do something
heuristically, but there is no way for you to be absolutely certain of the
message type simply by looking at encoded bytes.
Specific points in the code:
Thanks for looking into the code. Please see my comments inline.
On 8/27/2011 17:07 Jason Hsueh writes:
No, the issue is one and the same. You cannot receive arbitrary serialized
bytes and determine what the message type is. You can do something
heuristically, but there is no way for you to
On Sat, Aug 27, 2011 at 6:00 PM, Nader Salehi sal...@alumni.usc.edu wrote:
Thanks for looking into the code. Please see my comments inline.
On 8/27/2011 17:07 Jason Hsueh writes:
No, the issue is one and the same. You cannot receive arbitrary
serialized
bytes and determine what the
Sorry, I guess it's not clear if you know the message type or not. But the
issue is that you're getting some arbitrary message type out of the
transmitted FileDescriptorSet (in fact, any FileDescriptorSet that's ever
been received), not the type you want.
It's not clear from your code how the C++