Update helloworld
diff --git a/cpp/helloworld/Makefile b/cpp/helloworld/Makefile
index 83f2ad4..e6ddb64 100644
--- a/cpp/helloworld/Makefile
+++ b/cpp/helloworld/Makefile
@@ -32,7 +32,7 @@
CXX = g++
CPPFLAGS = -I/usr/local/include -pthread
CXXFLAGS = -std=c++11
-LDFLAGS = -L/usr/local/lib -lgrpc -lgrpc++ -lprotobuf -lpthread -ldl
+LDFLAGS = -L/usr/local/lib -lgrpc -lgrpc++_unsecure -lprotobuf -lpthread -ldl
PROTOC = protoc
GRPC_CPP_PLUGIN = grpc_cpp_plugin
GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)`
diff --git a/cpp/helloworld/greeter_client.cc b/cpp/helloworld/greeter_client.cc
index 0eb4746..0cec4a3 100644
--- a/cpp/helloworld/greeter_client.cc
+++ b/cpp/helloworld/greeter_client.cc
@@ -40,6 +40,7 @@
#include <grpc++/channel_interface.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
+#include <grpc++/credentials.h>
#include <grpc++/status.h>
#include "helloworld.pb.h"
@@ -80,7 +81,8 @@
grpc_init();
GreeterClient greeter(
- grpc::CreateChannelDeprecated("localhost:50051", ChannelArguments()));
+ grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials(),
+ ChannelArguments()));
std::string user("world");
std::string reply = greeter.SayHello(user);
std::cout << "Greeter received: " << reply << std::endl;
diff --git a/cpp/helloworld/greeter_server.cc b/cpp/helloworld/greeter_server.cc
index e3dd36b..7885a16 100644
--- a/cpp/helloworld/greeter_server.cc
+++ b/cpp/helloworld/greeter_server.cc
@@ -39,6 +39,7 @@
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
+#include <grpc++/server_credentials.h>
#include <grpc++/status.h>
#include "helloworld.pb.h"
@@ -64,7 +65,7 @@
GreeterServiceImpl service;
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;