|
|
@ -196,14 +196,22 @@ static grpc_channel_args *BuildChannelArgs(NSDictionary *dictionary) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (grpc_call *)unmanagedCallWithPath:(NSString *)path |
|
|
|
- (grpc_call *)unmanagedCallWithPath:(NSString *)path |
|
|
|
|
|
|
|
serverName:(NSString *)serverName |
|
|
|
completionQueue:(GRPCCompletionQueue *)queue { |
|
|
|
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); |
|
|
|
grpc_slice path_slice = grpc_slice_from_copied_string(path.UTF8String); |
|
|
|
grpc_call *call = grpc_channel_create_call(_unmanagedChannel, |
|
|
|
grpc_call *call = grpc_channel_create_call(_unmanagedChannel, |
|
|
|
NULL, GRPC_PROPAGATE_DEFAULTS, |
|
|
|
NULL, GRPC_PROPAGATE_DEFAULTS, |
|
|
|
queue.unmanagedQueue, |
|
|
|
queue.unmanagedQueue, |
|
|
|
path_slice, |
|
|
|
path_slice, |
|
|
|
NULL, // Passing NULL for host |
|
|
|
serverName ? &host_slice : NULL, |
|
|
|
gpr_inf_future(GPR_CLOCK_REALTIME), NULL); |
|
|
|
gpr_inf_future(GPR_CLOCK_REALTIME), NULL); |
|
|
|
|
|
|
|
if (serverName) { |
|
|
|
|
|
|
|
grpc_slice_unref(host_slice); |
|
|
|
|
|
|
|
} |
|
|
|
grpc_slice_unref(path_slice); |
|
|
|
grpc_slice_unref(path_slice); |
|
|
|
return call; |
|
|
|
return call; |
|
|
|
} |
|
|
|
} |
|
|
|