aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client/channel_arguments.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/client/channel_arguments.cc')
-rw-r--r--src/cpp/client/channel_arguments.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cpp/client/channel_arguments.cc b/src/cpp/client/channel_arguments.cc
index 7d6bd4e874..cc888c1091 100644
--- a/src/cpp/client/channel_arguments.cc
+++ b/src/cpp/client/channel_arguments.cc
@@ -41,6 +41,15 @@ void ChannelArguments::SetSslTargetNameOverride(const grpc::string& name) {
SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, name);
}
+grpc::string ChannelArguments::GetSslTargetNameOverride() const {
+ for (int i = 0; i < args_.size(); i++) {
+ if (grpc::string(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == args_[i].key) {
+ return args_[i].value.string;
+ }
+ }
+ return "";
+}
+
void ChannelArguments::SetInt(const grpc::string& key, int value) {
grpc_arg arg;
arg.type = GRPC_ARG_INTEGER;