25 #include "protos/helloworld.grpc.pb.h"
58 return reply.message();
60 std::cout <<
status.error_code() <<
": " <<
status.error_message()
67 std::unique_ptr<Greeter::Stub>
stub_;
70 int main(
int argc,
char** argv) {
80 size_t start_pos = arg_val.find(arg_str);
81 if (start_pos != std::string::npos) {
82 start_pos += arg_str.size();
83 if (arg_val[start_pos] ==
'=') {
84 target_str = arg_val.substr(start_pos + 1);
86 std::cout <<
"The only correct argument syntax is --target="
91 std::cout <<
"The only acceptable argument is --target=" << std::endl;
95 target_str =
"localhost:50051";
101 std::cout <<
"Greeter received: " << reply << std::endl;