CreateChannel API change syncup and regenerate files
This commit is contained in:
parent
798695f81c
commit
7c968086a9
|
|
@ -80,7 +80,7 @@ int main(int argc, char** argv) {
|
|||
grpc_init();
|
||||
|
||||
GreeterClient greeter(
|
||||
grpc::CreateChannel("localhost:50051", ChannelArguments()));
|
||||
grpc::CreateChannelDeprecated("localhost:50051", ChannelArguments()));
|
||||
std::string user("world");
|
||||
std::string reply = greeter.SayHello(user);
|
||||
std::cout << "Greeter received: " << reply << std::endl;
|
||||
|
|
|
|||
|
|
@ -590,8 +590,8 @@ static const char* Greeter_method_names[] = {
|
|||
"/helloworld.Greeter/SayHello",
|
||||
};
|
||||
|
||||
Greeter::Stub* Greeter::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) {
|
||||
Greeter::Stub* stub = new Greeter::Stub();
|
||||
std::unique_ptr< Greeter::Stub> Greeter::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) {
|
||||
std::unique_ptr< Greeter::Stub> stub(new Greeter::Stub());
|
||||
stub->set_channel(channel);
|
||||
return stub;
|
||||
};
|
||||
|
|
@ -600,8 +600,8 @@ Greeter::Stub* Greeter::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>
|
|||
return ::grpc::BlockingUnaryCall(channel(),::grpc::RpcMethod(Greeter_method_names[0]), context, request, response);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>* Greeter::Stub::SayHello(::grpc::ClientContext* context, const ::helloworld::HelloRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
|
||||
return new ::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>(channel(), cq, ::grpc::RpcMethod(Greeter_method_names[0]), context, request, tag);
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>> Greeter::Stub::SayHello(::grpc::ClientContext* context, const ::helloworld::HelloRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>>(new ::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>(channel(), cq, ::grpc::RpcMethod(Greeter_method_names[0]), context, request, tag));
|
||||
}
|
||||
|
||||
Greeter::AsyncService::AsyncService(::grpc::CompletionQueue* cq) : ::grpc::AsynchronousService(cq, Greeter_method_names, 1) {}
|
||||
|
|
|
|||
|
|
@ -320,9 +320,9 @@ class Greeter final {
|
|||
class Stub final : public ::grpc::InternalStub {
|
||||
public:
|
||||
::grpc::Status SayHello(::grpc::ClientContext* context, const ::helloworld::HelloRequest& request, ::helloworld::HelloReply* response);
|
||||
::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>* SayHello(::grpc::ClientContext* context, const ::helloworld::HelloRequest& request, ::grpc::CompletionQueue* cq, void* tag);
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>> SayHello(::grpc::ClientContext* context, const ::helloworld::HelloRequest& request, ::grpc::CompletionQueue* cq, void* tag);
|
||||
};
|
||||
static Stub* NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
|
||||
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
|
||||
|
||||
class Service : public ::grpc::SynchronousService {
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue