On Wed, Feb 6, 2013 at 11:04 AM, vc815 <[email protected]> wrote:

> CMsgHead head = CMsgHead.newBuilder().setMsglen(5)
>                         .setMsgtype(1).setMsgseq(3).setTermversion(41)
>
> .setMsgres(5).setTermid("你好你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你你
> 啊").build();
>
> when  server client
>
> CMsgHead head = CMsgHead.parseFrom(buffer );<<-------it it error
>
You should check if the buffer's length is the same as when you sent it
from the client.


>
> com.google.protobuf.InvalidProtocolBufferException: While parsing a
> protocol message, the input ended unexpectedly in the middle of a
> field.  This could mean either than the input has been truncated or
> that an embedded message misreported its own length.
>
> i do not why!
> is the  Field have Max length??  why  that when i  set lang string  it
> can not "parseFrom" and  error

thanks!!
>
> --
> 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 http://groups.google.com/group/protobuf?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to