pull/3164/head
yang-g 10 years ago
parent b2a30c196e
commit e69909a7e7
  1. 4
      examples/cpp/helloworld/greeter_async_client.cc
  2. 2
      examples/cpp/helloworld/greeter_async_server.cc
  3. 5
      examples/cpp/helloworld/greeter_client.cc
  4. 2
      examples/cpp/helloworld/greeter_server.cc
  5. 2
      examples/cpp/route_guide/route_guide_client.cc
  6. 2
      examples/cpp/route_guide/route_guide_server.cc

@ -41,7 +41,7 @@
#include <grpc++/client_context.h>
#include <grpc++/completion_queue.h>
#include <grpc++/create_channel.h>
#include <grpc++/credentials.h>
#include <grpc++/security/credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Channel;
@ -89,7 +89,7 @@ class GreeterClient {
int main(int argc, char** argv) {
GreeterClient greeter(grpc::CreateChannel(
"localhost:50051", grpc::InsecureCredentials(), ChannelArguments()));
"localhost:50051", grpc::InsecureCredentials()));
std::string user("world");
std::string reply = greeter.SayHello(user);
std::cout << "Greeter received: " << reply << std::endl;

@ -39,10 +39,10 @@
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpc++/completion_queue.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc++/server_credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Server;

@ -39,7 +39,7 @@
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
#include <grpc++/credentials.h>
#include <grpc++/security/credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Channel;
@ -75,8 +75,7 @@ class GreeterClient {
int main(int argc, char** argv) {
GreeterClient greeter(
grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials(),
ChannelArguments()));
grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials()));
std::string user("world");
std::string reply = greeter.SayHello(user);
std::cout << "Greeter received: " << reply << std::endl;

@ -36,10 +36,10 @@
#include <string>
#include <grpc/grpc.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc++/server_credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Server;

@ -42,7 +42,7 @@
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
#include <grpc++/credentials.h>
#include <grpc++/security/credentials.h>
#include "helper.h"
#include "route_guide.grpc.pb.h"

@ -42,7 +42,7 @@
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc++/server_credentials.h>
#include <grpc++/security/server_credentials.h>
#include "helper.h"
#include "route_guide.grpc.pb.h"

Loading…
Cancel
Save