+Ross who is the expert on protocol buffers for Go

I'm not familiar with the Go implementation so I may be misunderstanding
your question, but it sounds to me like you are trying to parse a protocol
buffer without knowing its size. Protocol buffers are not self-delimiting,
so it's not possible to parse them without knowing the number of bytes to
expect, and that may be the problem you're running into. The usual solution
to this is to prefix each serialized proto with its size in bytes.

On Wed, Jul 27, 2016 at 12:30 PM, Tonny Staunsbrink <12br...@gmail.com>
wrote:

> Is there a graceful way to detect having reached the end of a
> protobuf.Buffer (Golang)?
> I always end up with unexpected EOF
>
> --
> 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 protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to