|
|
|
@ -114,9 +114,9 @@ int main(int argc, char** argv) { |
|
|
|
|
// Instantiate the client. It requires a channel, out of which the actual RPCs
|
|
|
|
|
// are created. This channel models a connection to an endpoint (in this case,
|
|
|
|
|
// localhost at port 50051). We indicate that the channel isn't authenticated
|
|
|
|
|
// (use of InsecureCredentials()).
|
|
|
|
|
GreeterClient greeter( |
|
|
|
|
grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials())); |
|
|
|
|
// (use of InsecureChannelCredentials()).
|
|
|
|
|
GreeterClient greeter(grpc::CreateChannel( |
|
|
|
|
"localhost:50051", grpc::InsecureChannelCredentials())); |
|
|
|
|
std::string user("world"); |
|
|
|
|
std::string reply = greeter.SayHello(user); // The actual RPC call!
|
|
|
|
|
std::cout << "Greeter received: " << reply << std::endl; |
|
|
|
|