//! Request a page object from the cache
message PageRequest {
string page_title = 1;
}
//! cache page wrapper
message PageResponse {
// embed the page title in case we decide to stream
// many of these back to back using the streaming API
string page_title = 1;
Page page_data = 2;
}
//! Gateway Service.
service GWService {
. . .
// request a specific
rpc GetPage(PageRequest) returns (PageResponse) {}
}
--
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 grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
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/4e8ac2d7-2811-4098-af3a-c8ea34cb04bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
void ListFeatures() { routeguide::Rectangle rect; Feature feature; ClientContext context; rect.mutable_lo()->set_latitude(400000000); rect.mutable_lo()->set_longitude(-750000000); rect.mutable_hi()->set_latitude(420000000); rect.mutable_hi()->set_longitude(-730000000); std::cout << "Looking for features between 40, -75 and 42, -73" << std::endl; std::unique_ptr<ClientReader<Feature> > reader( stub_->ListFeatures(&context, rect)); while (reader->Read(&feature)) { std::cout << "Found feature called " << feature.name() << " at " << feature.location().latitude()/kCoordFactor_ << ", " << feature.location().longitude()/kCoordFactor_ << std::endl; } Status status = reader->Finish(); if (status.ok()) { std::cout << "ListFeatures rpc succeeded." << std::endl; } else { std::cout << "ListFeatures rpc failed." << std::endl; } }
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/352b2403-bebc-4bfc-9589-b5761a3aa84b%40googlegroups.com.