26 #include "examples/protos/helloworld.grpc.pb.h"
28 #include "helloworld.grpc.pb.h"
62 return reply.message();
64 std::cout <<
status.error_code() <<
": " <<
status.error_message()
71 std::unique_ptr<Greeter::Stub>
stub_;
74 int main(
int argc,
char** argv) {
84 size_t start_pos = arg_val.find(arg_str);
85 if (start_pos != std::string::npos) {
86 start_pos += arg_str.size();
87 if (arg_val[start_pos] ==
'=') {
88 target_str = arg_val.substr(start_pos + 1);
90 std::cout <<
"The only correct argument syntax is --target="
95 std::cout <<
"The only acceptable argument is --target=" << std::endl;
99 target_str =
"localhost:50051";
105 std::cout <<
"Greeter received: " << reply << std::endl;