From ca0d12a3c3d832de717e2e82f24343e5d7c014df Mon Sep 17 00:00:00 2001
From: Muxi Yan <mxyan@google.com>
Date: Wed, 24 Apr 2019 10:04:09 -0700
Subject: [PATCH] Polish and add comments

---
 src/objective-c/GRPCClient/GRPCCall.h |  6 ++++++
 src/objective-c/ProtoRPC/ProtoRPC.h   | 18 ++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h
index 8e02ada38d..97ece7e0c9 100644
--- a/src/objective-c/GRPCClient/GRPCCall.h
+++ b/src/objective-c/GRPCClient/GRPCCall.h
@@ -269,6 +269,12 @@ extern NSString *const kGRPCTrailersKey;
  */
 - (void)finish;
 
+/**
+ * Tell gRPC to receive the next N gRPC message from gRPC core.
+ *
+ * This method should only be used when flow control is enabled. When flow control is not enabled,
+ * this method is a no-op.
+ */
 - (void)receiveNextMessages:(NSUInteger)numberOfMessages;
 
 /**
diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h
index 78d1bd3df3..12db46aded 100644
--- a/src/objective-c/ProtoRPC/ProtoRPC.h
+++ b/src/objective-c/ProtoRPC/ProtoRPC.h
@@ -138,16 +138,22 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)finish;
 
 /**
- * Tell gRPC to receive the next message. If flow control is enabled, the messages received from the
- * server are buffered in gRPC until the user want to receive the next message. If flow control is
- * not enabled, messages will be automatically received after the previous one is delivered.
+ * Tell gRPC to receive another message.
+ *
+ * This method should only be used when flow control is enabled. If flow control is enabled, gRPC
+ * will only receive additional messages after the user indicates so by using either
+ * receiveNextMessage: or receiveNextMessages: methods. If flow control is not enabled, messages
+ * will be automatically received after the previous one is delivered.
  */
 - (void)receiveNextMessage;
 
 /**
- * Tell gRPC to receive the next N message. If flow control is enabled, the messages received from
- * the server are buffered in gRPC until the user want to receive the next message. If flow control
- * is not enabled, messages will be automatically received after the previous one is delivered.
+ * Tell gRPC to receive another N message.
+ *
+ * This method should only be used when flow control is enabled. If flow control is enabled, the
+ * messages received from the server are buffered in gRPC until the user want to receive the next
+ * message. If flow control is not enabled, messages will be automatically received after the
+ * previous one is delivered.
  */
 - (void)receiveNextMessages:(NSUInteger)numberOfMessages;
 
-- 
GitLab