remove ChannelArguments ref and update doc

pull/3139/head
yang-g 10 years ago
parent b00a3f689f
commit 92806a51ba
  1. 4
      examples/cpp/cpptutorial.md
  2. 2
      examples/cpp/helloworld/README.md
  3. 1
      examples/cpp/helloworld/greeter_async_client.cc
  4. 1
      examples/cpp/helloworld/greeter_client.cc
  5. 1
      examples/cpp/route_guide/route_guide_client.cc

@ -242,10 +242,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` and no SSL:
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(), ChannelArguments());
grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials());
```
Now we can use the channel to create our stub using the `NewStub` method provided in the `RouteGuide` class we generated from our .proto.

@ -94,7 +94,7 @@ $ protoc -I ../../protos/ --cpp_out=. ../../protos/helloworld.proto
arguments as follows
```
auto channel = CreateChannel("localhost:50051", InsecureCredentials(), ChannelArguments());
auto channel = CreateChannel("localhost:50051", InsecureCredentials());
```
- Create a stub. A stub implements the rpc methods of a service and in the

@ -45,7 +45,6 @@
#include "helloworld.grpc.pb.h"
using grpc::Channel;
using grpc::ChannelArguments;
using grpc::ClientAsyncResponseReader;
using grpc::ClientContext;
using grpc::CompletionQueue;

@ -43,7 +43,6 @@
#include "helloworld.grpc.pb.h"
using grpc::Channel;
using grpc::ChannelArguments;
using grpc::ClientContext;
using grpc::Status;
using helloworld::HelloRequest;

@ -47,7 +47,6 @@
#include "route_guide.grpc.pb.h"
using grpc::Channel;
using grpc::ChannelArguments;
using grpc::ClientContext;
using grpc::ClientReader;
using grpc::ClientReaderWriter;

Loading…
Cancel
Save