On 04/01/2013 03:11 PM, Kagamin wrote:
On Monday, 1 April 2013 at 18:41:57 UTC, Matt Soucy wrote:
The "packed repeated fields" section explains it and breaks it down
with an example. If the client can close like that, you probably don't
want to use packed.

Why not? If you transfer a result of google search, the client will be
able to peek only N first results and close or not. Though I agree it's
strange that you can only transfer primitive types this way.
It's not really strange, because of how it actually does the serialization. A message is recorded as length+serialized members. Members can happen in any order. Packed repeated messages would look like...what? How do you know when one message ends and another begins? If you try and denote it, you'd just end up with what you already have. In your example, you'd want to send each individual result as a distinct message, so they could be read one at a time. You wouldn't want to pack, as packing is for sending a whole data set at once.

Reply via email to