aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-08-30 15:36:47 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-08-30 15:37:45 -0700
commitc7c8e3cb1712438c64b1212911b6c22165982426 (patch)
tree0d173f0c0585582250af4d00d5101ac9e56bad6d /src/objective-c/GRPCClient/private
parentf282c8f525788e6f15331bb6c94471012a7e5346 (diff)
Rename deadline to timeout
Diffstat (limited to 'src/objective-c/GRPCClient/private')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.h2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.m12
-rw-r--r--src/objective-c/GRPCClient/private/GRPCHost.h2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCHost.m4
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.h2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m6
6 files changed, 14 insertions, 14 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h
index 67d78c3a44..9dff86c271 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.h
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.h
@@ -63,6 +63,6 @@ struct grpc_channel_credentials;
- (nullable grpc_call *)unmanagedCallWithPath:(nonnull NSString *)path
serverName:(nonnull NSString *)serverName
- deadline:(UInt64)deadline
+ timeout:(UInt64)timeout
completionQueue:(nonnull GRPCCompletionQueue *)queue;
@end
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m
index 72dc961d09..39b4e6c1a7 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.m
@@ -182,18 +182,18 @@ static grpc_channel_args *BuildChannelArgs(NSDictionary *dictionary) {
- (grpc_call *)unmanagedCallWithPath:(NSString *)path
serverName:(NSString *)serverName
- deadline:(UInt64)deadline
+ timeout:(UInt64)timeout
completionQueue:(GRPCCompletionQueue *)queue {
grpc_slice host_slice;
if (serverName) {
host_slice = grpc_slice_from_copied_string(serverName.UTF8String);
}
grpc_slice path_slice = grpc_slice_from_copied_string(path.UTF8String);
- gpr_timespec deadline_ms = deadline == 0 ?
- gpr_inf_future(GPR_CLOCK_REALTIME) :
- gpr_time_add(
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_millis(deadline, GPR_TIMESPAN));
+ gpr_timespec deadline_ms = timeout == 0 ?
+ gpr_inf_future(GPR_CLOCK_REALTIME) :
+ gpr_time_add(
+ gpr_now(GPR_CLOCK_MONOTONIC),
+ gpr_time_from_millis(timeout, GPR_TIMESPAN));
grpc_call *call = grpc_channel_create_call(_unmanagedChannel,
NULL, GRPC_PROPAGATE_DEFAULTS,
queue.unmanagedQueue,
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.h b/src/objective-c/GRPCClient/private/GRPCHost.h
index 7513cd0b8d..a9b3032c9c 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.h
+++ b/src/objective-c/GRPCClient/private/GRPCHost.h
@@ -55,7 +55,7 @@ struct grpc_channel_credentials;
/** Create a grpc_call object to the provided path on this host. */
- (nullable struct grpc_call *)unmanagedCallWithPath:(NSString *)path
serverName:(NSString *)serverName
- deadline:(UInt64)deadline
+ timeout:(UInt64)timeout
completionQueue:(GRPCCompletionQueue *)queue;
// TODO: There's a race when a new RPC is coming through just as an existing one is getting
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m
index b847637ac5..a0791827db 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.m
+++ b/src/objective-c/GRPCClient/private/GRPCHost.m
@@ -121,7 +121,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
- (nullable grpc_call *)unmanagedCallWithPath:(NSString *)path
serverName:(NSString *)serverName
- deadline:(UInt64)deadline
+ timeout:(UInt64)timeout
completionQueue:(GRPCCompletionQueue *)queue {
GRPCChannel *channel;
// This is racing -[GRPCHost disconnect].
@@ -133,7 +133,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil;
}
return [channel unmanagedCallWithPath:path
serverName:serverName
- deadline:deadline
+ timeout:timeout
completionQueue:queue];
}
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
index 1995f1d0b5..c0a6c71c72 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
@@ -77,7 +77,7 @@
- (instancetype)initWithHost:(NSString *)host
serverName:(NSString *)serverName
path:(NSString *)path
- deadline:(UInt64)deadline NS_DESIGNATED_INITIALIZER;
+ timeout:(UInt64)timeout NS_DESIGNATED_INITIALIZER;
- (void)startBatchWithOperations:(NSArray *)ops errorHandler:(void(^)())errorHandler;
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index b855a96bee..7366f31931 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -238,13 +238,13 @@
}
- (instancetype)init {
- return [self initWithHost:nil serverName:nil path:nil deadline:0];
+ return [self initWithHost:nil serverName:nil path:nil timeout:0];
}
- (instancetype)initWithHost:(NSString *)host
serverName:(NSString *)serverName
path:(NSString *)path
- deadline:(UInt64)deadline {
+ timeout:(UInt64)timeout {
if (!path || !host) {
[NSException raise:NSInvalidArgumentException
format:@"path and host cannot be nil."];
@@ -258,7 +258,7 @@
_call = [[GRPCHost hostWithAddress:host] unmanagedCallWithPath:path
serverName:serverName
- deadline:deadline
+ timeout:timeout
completionQueue:_queue];
if (_call == NULL) {
return nil;