diff options
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannel.h')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCChannel.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h index bc6a47d469..49f5bfcc18 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.h +++ b/src/objective-c/GRPCClient/private/GRPCChannel.h @@ -33,19 +33,19 @@ #import <Foundation/Foundation.h> -struct grpc_channel; +#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, 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. +// To create a grpc_call to that host, use |unmanagedCallWithPath|. Release this object when the +// call is finished. @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; +- (instancetype)initWithChannel:(grpc_channel *)unmanagedChannel + hostName:(NSString *)hostName NS_DESIGNATED_INITIALIZER; -- (instancetype)initWithChannel:(struct grpc_channel *)unmanagedChannel NS_DESIGNATED_INITIALIZER; +- (grpc_call *)unmanagedCallWithPath:(NSString *)path; @end |