aboutsummaryrefslogtreecommitdiffhomepage
path: root/cpp
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-03-06 23:58:42 -0800
committerGravatar Yang Gao <yangg@google.com>2015-03-06 23:58:42 -0800
commit85df5b7c37510349f557b2ac44aef71006e622f4 (patch)
tree4e0c0c178b308eb2426cd9937b1bfd30e755d33e /cpp
parent3eab5d2e4a58c8e8eddb2f5ef9812550cd35ed42 (diff)
Update text
Diffstat (limited to 'cpp')
-rw-r--r--cpp/cpptutorial.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/cpptutorial.md b/cpp/cpptutorial.md
index 01eff07108..9cd76fab07 100644
--- a/cpp/cpptutorial.md
+++ b/cpp/cpptutorial.md
@@ -214,7 +214,7 @@ void RunServer(const std::string& db_path) {
RouteGuideImpl service(db_path);
ServerBuilder builder;
- builder.AddPort(server_address);
+ builder.AddPort(server_address, grpc::InsecureServerCredentials());
builder.RegisterService(&service);
std::unique_ptr<Server> server(builder.BuildAndStart());
std::cout << "Server listening on " << server_address << std::endl;
@@ -239,10 +239,10 @@ In this section, we'll look at creating a C++ client for our `RouteGuide` servic
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 and any special channel arguments - in our case we'll use the default `ChannelArguments`:
+First we need to create a gRPC *channel* for our stub, specifying the server address and port we want to connect to and any special channel arguments - in our case we'll use the default `ChannelArguments` and no SSL:
```cpp
-grpc::CreateChannelDeprecated("localhost:50051", ChannelArguments());
+grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials(), ChannelArguments());
```
Now we can use the channel to create our stub using the `NewStub` method provided in the `RouteGuide` class we generated from our .proto.