Re: [protobuf] it would be cool if there are some functions that parse pb from (or serailize pb to) a vector of buffers

2013-12-12 Thread Henner Zeller
On 11 December 2013 18:45,  wrote:

> when "recv" data from tcp socket, we don't know how long the packet will
> be. Generally, I would pre-alloc(for the sake of reusing) a vector of
> buffers which each buffer has the same size. The problem is that it's hard
> to parse pb from the vector of buffers.
>

Can't you just write a very simple implementation of ZeroCopyInputStream
that returns a new buffer in each Next() call ?


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


[protobuf] it would be cool if there are some functions that parse pb from (or serailize pb to) a vector of buffers

2013-12-12 Thread wilesduan
when "recv" data from tcp socket, we don't know how long the packet will 
be. Generally, I would pre-alloc(for the sake of reusing) a vector of 
buffers which each buffer has the same size. The problem is that it's hard 
to parse pb from the vector of buffers.

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