aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private
diff options
context:
space:
mode:
authorGravatar makdharma <makdharma@users.noreply.github.com>2016-10-05 14:48:16 -0700
committerGravatar GitHub <noreply@github.com>2016-10-05 14:48:16 -0700
commitba46906c925e95b01b299e048441b734d70493b7 (patch)
tree14a0af69c99c528a3dda9bd39b946aafa1aa8ef7 /src/objective-c/GRPCClient/private
parentda865f16c25031664cfad4aef5acac6299a63514 (diff)
parent8739e806fcc0358a404ff7e752fddb49898be409 (diff)
Merge pull request #8223 from muxi/add-quic-support
Add QUIC support to Objective C
Diffstat (limited to 'src/objective-c/GRPCClient/private')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.h4
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m12
2 files changed, 14 insertions, 2 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
index e37ed1b59f..52233c8242 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
@@ -45,6 +45,10 @@
@interface GRPCOpSendMetadata : GRPCOperation
- (instancetype)initWithMetadata:(NSDictionary *)metadata
+ handler:(void(^)())handler;
+
+- (instancetype)initWithMetadata:(NSDictionary *)metadata
+ flags:(uint32_t)flags
handler:(void(^)())handler NS_DESIGNATED_INITIALIZER;
@end
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 1339429660..627b6aa86d 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -64,16 +64,24 @@
@implementation GRPCOpSendMetadata
- (instancetype)init {
- return [self initWithMetadata:nil handler:nil];
+ return [self initWithMetadata:nil flags:0 handler:nil];
}
-- (instancetype)initWithMetadata:(NSDictionary *)metadata handler:(void (^)())handler {
+- (instancetype)initWithMetadata:(NSDictionary *)metadata
+ handler:(void (^)())handler {
+ return [self initWithMetadata:metadata flags:0 handler:handler];
+}
+
+- (instancetype)initWithMetadata:(NSDictionary *)metadata
+ flags:(uint32_t)flags
+ handler:(void (^)())handler {
if (self = [super init]) {
_op.op = GRPC_OP_SEND_INITIAL_METADATA;
_op.data.send_initial_metadata.count = metadata.count;
_op.data.send_initial_metadata.metadata = metadata.grpc_metadataArray;
_op.data.send_initial_metadata.maybe_compression_level.is_set = false;
_op.data.send_initial_metadata.maybe_compression_level.level = 0;
+ _op.flags = flags;
_handler = handler;
}
return self;