aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-03-19 20:37:28 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-03-26 11:50:10 -0700
commit6d855c5f3c7518e2b26a97e464ebb9366da05993 (patch)
tree8e4957ce849ea4c7c711150510f7fbc7dc7e26b9 /src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
parentbc7e096dd38cd8fca1504986abd2025019004563 (diff)
Allow gRPC ObjC user to set keepalive options
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.m')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+ChannelArg.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
index 805e54b890..217d0e9220 100644
--- a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
+++ b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m
@@ -57,4 +57,12 @@
}
}
++ (void)setKeepaliveWithInterval:(int)interval
+ timeout:(int)timeout
+ forHost:(nonnull NSString *)host {
+ GRPCHost *hostConfig = [GRPCHost hostWithAddress:host];
+ hostConfig.keepaliveInterval = interval;
+ hostConfig.keepaliveTimeout = timeout;
+}
+
@end