diff --git a/examples/cpp/cpptutorial.md b/examples/cpp/cpptutorial.md index 78de014f97d1978b4195dca5b84306fc66a8375c..cd1cddb11157be6f1bd48d07955a15f5bd4898a0 100644 --- a/examples/cpp/cpptutorial.md +++ b/examples/cpp/cpptutorial.md @@ -245,7 +245,7 @@ To call service methods, we first need to create a *stub*. First we need to create a gRPC *channel* for our stub, specifying the server address and port we want to connect to without SSL: ```cpp -grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials()); +grpc::CreateChannel("localhost:50051", grpc::InsecureChannelCredentials()); ``` Now we can use the channel to create our stub using the `NewStub` method provided in the `RouteGuide` class we generated from our .proto. diff --git a/examples/cpp/helloworld/README.md b/examples/cpp/helloworld/README.md index b16c084583dc97abad2fa1a4ffae0991f1531d96..7a7194d11186a6134aff2c494d9f9f2854dead4b 100644 --- a/examples/cpp/helloworld/README.md +++ b/examples/cpp/helloworld/README.md @@ -94,7 +94,7 @@ $ protoc -I ../../protos/ --cpp_out=. ../../protos/helloworld.proto arguments as follows ``` - auto channel = CreateChannel("localhost:50051", InsecureCredentials()); + auto channel = CreateChannel("localhost:50051", InsecureChannelCredentials()); ``` - Create a stub. A stub implements the rpc methods of a service and in the diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc index 923c8ffa743dba81cbe8740492ace7a2772b6e96..35014267febe9ccd1bab506de49e38ccf18af987 100644 --- a/examples/cpp/helloworld/greeter_async_client.cc +++ b/examples/cpp/helloworld/greeter_async_client.cc @@ -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; diff --git a/examples/cpp/helloworld/greeter_client.cc b/examples/cpp/helloworld/greeter_client.cc index 6cd8353a9fb21498d04d5a6bff1a0b9ce40a10d9..bf3b63cb5774752914d28e4662973db549c11466 100644 --- a/examples/cpp/helloworld/greeter_client.cc +++ b/examples/cpp/helloworld/greeter_client.cc @@ -84,9 +84,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); std::cout << "Greeter received: " << reply << std::endl; diff --git a/examples/cpp/route_guide/route_guide_client.cc b/examples/cpp/route_guide/route_guide_client.cc index 85173a393256832369a2ad701eed2e50c80b0a52..b9abe72a5bd7a8d453f1405d50f3b9426a16717e 100644 --- a/examples/cpp/route_guide/route_guide_client.cc +++ b/examples/cpp/route_guide/route_guide_client.cc @@ -234,7 +234,8 @@ int main(int argc, char** argv) { // Expect only arg: --db_path=path/to/route_guide_db.json. std::string db = routeguide::GetDbFileContent(argc, argv); RouteGuideClient guide( - grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials()), + grpc::CreateChannel("localhost:50051", + grpc::InsecureChannelCredentials()), db); std::cout << "-------------- GetFeature --------------" << std::endl;