std::unique_ptr AcsAgentClientReactor::CreateStub()

in cpp/acs_agent_client_reactor.cc [65:77]


std::unique_ptr<AcsStub> AcsAgentClientReactor::CreateStub(
    const std::string& endpoint) {
  grpc::SslCredentialsOptions options;
  grpc::ChannelArguments channel_args;
  // Keepalive settings
  channel_args.SetInt(GRPC_ARG_KEEPALIVE_TIME_MS, 60 * 1000);  // 60 seconds
  channel_args.SetInt(GRPC_ARG_KEEPALIVE_TIMEOUT_MS,
                      10 * 1000);  // 10 seconds
  return google::cloud::agentcommunication::v1::AgentCommunication::NewStub(
      grpc::CreateCustomChannel(
          endpoint,
          grpc::SslCredentials(options), channel_args));
}