diff options
author | 2015-08-01 17:37:40 -0700 | |
---|---|---|
committer | 2015-08-01 18:02:37 -0700 | |
commit | e8543b071502fe0609d0c1657cfaf39d1a04c25d (patch) | |
tree | 2db8a7886fa5d0514495d1f19f8895edd23d09eb /src/objective-c/GRPCClient/private/GRPCChannel.h | |
parent | 148403af988522e61f4e71dc1bbd00b9f0d51a42 (diff) |
Let register SSL config per-host.
Surfaced in GRPCCall+Tests.h
Add GRPCHost to store channel config, and to create channels on demand
with that config. GRPCChannels and configs are cached together.
GRPCSecureChannel is now initialized with (nullable) path to a
certificates file and (nullable) name override.
The same mechanism will be used for creating insecure channels, removing
the ability to do it by specifying the HTTP scheme in the address (which
was deemed too subtle for its implications).
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannel.h')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCChannel.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h index 49f8b712b9..fa9f6f28d1 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.h +++ b/src/objective-c/GRPCClient/private/GRPCChannel.h @@ -36,15 +36,9 @@ #include <grpc/grpc.h> // Each separate instance of this class represents at least one TCP connection to the provided host. -// To create a grpc_call to that host, use |unmanagedCallWithPath|. Release this object when the -// call is finished. +// Create them using one of the subclasses |GRPCSecureChannel| and |GRPCUnsecuredChannel|. @interface GRPCChannel : NSObject +@property(nonatomic) grpc_channel *unmanagedChannel; -// Convenience constructor to allow for reuse of connections. -+ (instancetype)channelToHost:(NSString *)host; - -- (instancetype)initWithChannel:(grpc_channel *)unmanagedChannel - hostName:(NSString *)hostName NS_DESIGNATED_INITIALIZER; - -- (grpc_call *)unmanagedCallWithPath:(NSString *)path; +- (instancetype)initWithChannel:(grpc_channel *)unmanagedChannel NS_DESIGNATED_INITIALIZER; @end |