Start initialization phase on application nack
PartialProducer: append sequence number in hello data
refs: #4693
Change-Id: I56ac3e331a92b9a79d3bf360571df2914a5374aa
diff --git a/src/consumer.hpp b/src/consumer.hpp
index 47825a9..9b30d8d 100644
--- a/src/consumer.hpp
+++ b/src/consumer.hpp
@@ -46,11 +46,17 @@
* @brief Consumer logic to subscribe to producer's data
*
* Application needs to call sendHelloInterest to get the subscription list
- * in ReceiveHelloCallback. It can then add the desired names using addSubscription.
+ * in psync::ReceiveHelloCallback. It can then add the desired names using addSubscription.
* Finally application will call sendSyncInterest. If the application adds something
* later to the subscription list then it may call sendSyncInterest again for
* sending the next sync interest with updated IBF immediately to reduce any delay in sync data.
* Whenever there is new data UpdateCallback will be called to notify the application.
+ *
+ * If consumer wakes up after a long time to sync, producer may not decode the differences
+ * with its old IBF successfully and send an application nack. Upon receiving the nack,
+ * consumer will send a hello again and inform the application via psync::ReceiveHelloCallback
+ * and psync::UpdateCallback.
+ *
* Currently, fetching of the data needs to be handled by the application.
*/
class Consumer
@@ -97,6 +103,7 @@
* @brief Add prefix to subscription list
*
* @param prefix prefix to be added to the list
+ * @return true if prefix is added, false if it is already present
*/
bool
addSubscription(const ndn::Name& prefix);