client code needs to call start() in order to start syncing
diff --git a/model/sync-app-socket.h b/model/sync-app-socket.h
index dfa29db..465cc5c 100644
--- a/model/sync-app-socket.h
+++ b/model/sync-app-socket.h
@@ -70,6 +70,11 @@
*/
void remove (const std::string &prefix) {m_syncLogic.remove(prefix);}
+ /**
+ * @brief start sync process
+ */
+ void start() {m_syncLogic.start();}
+
private:
CcnxWrapperPtr m_ccnxHandle;
diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index c46dbe8..a7fc746 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -49,6 +49,11 @@
m_ccnxHandle->setInterestFilter (syncPrefix,
bind (&SyncLogic::respondSyncInterest, this, _1));
+
+}
+
+void SyncLogic::start()
+{
// We need to send out our Sync Interest when we're ready
sendSyncInterest();
}
diff --git a/model/sync-logic.h b/model/sync-logic.h
index 4270181..547c01f 100644
--- a/model/sync-logic.h
+++ b/model/sync-logic.h
@@ -88,6 +88,11 @@
*/
void remove (const std::string &prefix);
+ /**
+ * @brief start the sync process
+ */
+ void start();
+
#ifdef _DEBUG
Scheduler &
getScheduler () { return m_delayedChecksScheduler; }
diff --git a/test/test_app_socket.cc b/test/test_app_socket.cc
index 4ef86c9..016ef54 100644
--- a/test/test_app_socket.cc
+++ b/test/test_app_socket.cc
@@ -74,6 +74,9 @@
SyncAppSocket s1(syncPrefix, f1), s2(syncPrefix, f2), s3(syncPrefix, f3);
+ s1.start();
+ s2.start();
+ s3.start();
// single source
string data0 = "Very funny Scotty, now beam down my clothes";