Hi Vijay,
Ok, so I changed the code in the following way:
CompletionQueue cq;
std::unique_ptr<ClientAsyncReader<Feature> > reader(stub_->
AsyncListFeatures(&context, rect,&cq,(void*)1));
void* got_tag;
bool ok;
bool ret = cq.Next(&got_tag, &ok);
if (ret && ok && got_tag == (void*)1) {
while (1) {
reader->Read(&feature,(void*)1);
ok = false;
ret = cq.Next(&got_tag, &ok);
if (!ret || !ok || got_tag != (void*)1) {
break;
}
std::cout << "Found feature called "
<< feature.name() << " at "
<< feature.location().latitude()/kCoordFactor_ << ", "
<< feature.location().longitude()/kCoordFactor_ << std::endl
;
}
}
And now it seems to work properly.
Could you please confirm that it is correct now?
Thanks.
Julien
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/b4486bc5-5759-42c1-a2cc-6c5d5d30e852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.