Added processEvents() call to TorrentManager and update clients to use it including adding a seed method to the FetchStratedegyManager to seed data.
Change-Id: I98e4c794c98ca35765df968c2cf7c4fe1e622595
diff --git a/src/torrent-manager.hpp b/src/torrent-manager.hpp
index 17e59db..4a8beb4 100644
--- a/src/torrent-manager.hpp
+++ b/src/torrent-manager.hpp
@@ -147,8 +147,15 @@
void
seed(const Data& data);
+ /**
+ * @brief Process any data to receive or call timeout callbacks and update prefix list (if needed)
+ * By default only process pending events and return immediately, optionally specify a timeout.
+ */
+ void
+ processEvents(const time::milliseconds& timeout = time::milliseconds(-1));
+
protected:
- /*
+ /**
* \brief Write @p packet composed of torrent date to disk.
* @param packet The data packet to be written to the disk
* Write the Data packet to disk, return 'true' if data successfully written to disk 'false'
@@ -359,6 +366,13 @@
m_stats_table_iter = m_statsTable.begin();
}
+inline
+void
+TorrentManager::processEvents(const time::milliseconds& timeout)
+{
+ m_face->processEvents(timeout);
+}
+
} // end ntorrent
} // end ndn