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();
if(!request.ParseFromCodedStream(&in)) {
        // die (cannot parse stdin) shoud die or send back error?
        LOG("Cannot parse pb message.");
        return -1;
}
in.PopLimit(limit);
}

On the caller application i open a pipe to the previous app and write
a pb message of 10766 bytes and don't close the pipe but the first
application never finishes the if evaluation.

How does one read several messages from a pipe or file?

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

Reply via email to