Hello,

I've got the following issue:
When using self-written streambuf that may block on underflow()
(reimplements std::streambuf::underflow() ).

Implementation of my underflow() waits for the next chunk of raw bytes
for some time. If the data arrives then streambuf continues operate.
If no data arrives EOS returned.

The sticky thing is that when all necessary bytes to represent the
message are in buffer ParseFromIstream( my_costom_bufstream) tries to
consume all input, and it may block or/and consume more bytes than
needed.

Is there a workaround to force protobuf not to read more than
necessary from the istream?

Size prefixing protocol is the way, but it leads to supplier side
efficiency losses :(.



-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to