diff options
author | Muxi Yan <mxyan@google.com> | 2017-08-30 14:40:15 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-08-30 14:40:15 -0700 |
commit | f282c8f525788e6f15331bb6c94471012a7e5346 (patch) | |
tree | 9a209804c3c3d2e7598c45dab0b6fa89b771a402 /src/objective-c/GRPCClient/private/GRPCWrappedCall.m | |
parent | 5646c7463c24ddd04e639ddd35b63db0c0dc06fb (diff) |
Surface call deadline to Objective C API
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCWrappedCall.m')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 87dc33af88..b855a96bee 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -238,12 +238,13 @@ } - (instancetype)init { - return [self initWithHost:nil serverName:nil path:nil]; + return [self initWithHost:nil serverName:nil path:nil deadline:0]; } - (instancetype)initWithHost:(NSString *)host serverName:(NSString *)serverName - path:(NSString *)path { + path:(NSString *)path + deadline:(UInt64)deadline { if (!path || !host) { [NSException raise:NSInvalidArgumentException format:@"path and host cannot be nil."]; @@ -255,7 +256,10 @@ // queue. Currently we use a singleton queue. _queue = [GRPCCompletionQueue completionQueue]; - _call = [[GRPCHost hostWithAddress:host] unmanagedCallWithPath:path serverName:serverName completionQueue:_queue]; + _call = [[GRPCHost hostWithAddress:host] unmanagedCallWithPath:path + serverName:serverName + deadline:deadline + completionQueue:_queue]; if (_call == NULL) { return nil; } |