aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCChannel.h
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-08-06 22:51:27 -0700
committerGravatar yang-g <yangg@google.com>2015-08-06 22:51:27 -0700
commit87e133e13ae06ef5d1752cf37a473896ddf555cb (patch)
tree5bb0c0ef8221fb51914e7c146751280f4f5ef7df /src/objective-c/GRPCClient/private/GRPCChannel.h
parentc8abca8f5311832f41751ab11bb2365f9e348ad8 (diff)
parent03b19118e349ca480f2739ed6efd00ba7be4cf45 (diff)
merge with head
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannel.h')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h
index bc6a47d469..2a7b701576 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.h
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.h
@@ -35,17 +35,12 @@
struct grpc_channel;
-// Each separate instance of this class represents at least one TCP
-// connection to the provided host. To create a grpc_call, pass the
-// value of the unmanagedChannel property to grpc_channel_create_call.
-// Release this object when the call is finished.
+// Each separate instance of this class represents at least one TCP connection to the provided host.
+// Create them using one of the subclasses |GRPCSecureChannel| and |GRPCUnsecuredChannel|.
@interface GRPCChannel : NSObject
@property(nonatomic, readonly) struct grpc_channel *unmanagedChannel;
-// Convenience constructor to allow for reuse of connections.
-+ (instancetype)channelToHost:(NSString *)host;
-
-- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER;
-
+// This initializer takes ownership of the passed channel, and will destroy it when this object is
+// deallocated. It's illegal to pass the same grpc_channel to two different GRPCChannel objects.
- (instancetype)initWithChannel:(struct grpc_channel *)unmanagedChannel NS_DESIGNATED_INITIALIZER;
@end