Hi,
I've a pipe where i write several pb messages, assuming that their
size is kown to be 10766 bytes i wrote this code:
IstreamInputStream input(std::cin);
CodedInputStream in(input);
while(!std:cin.eof()) {
CodedInputStream::Limit limit = in.PushLimit(10766);
request.Clear();
I have a simple app that received data using the stdin and i have this
loop:
for(;;) {
if(!request.ParseFromIstream(cin)) {
cerr Cannot parse pb message. endl;
return -1;
}
do_something();
}
I wanted to test my app so i serialized a
assume that parsing empty input is an
error. You just need to test cin.eof() separately.
On Wed, Jul 28, 2010 at 7:18 AM, jetcube pmlo...@gmail.com wrote:
I have a simple app that received data using the stdin and i have this
loop:
for(;;) {
if(!request.ParseFromIstream(cin