58 const std::string EpidemicRoutingExtension::TAG =
"EpidemicRoutingExtension";
79 _taskqueue.push(
new SearchNextBundleTask( peer ) );
87 for (std::set<dtn::core::Node>::const_iterator iter = nl.begin(); iter != nl.end(); ++iter)
94 eventDataChanged(n.
getEID());
107 _taskqueue.push(
new SearchNextBundleTask( handshake.
peer ) );
112 _taskqueue.push(
new SearchNextBundleTask( handshake.
peer ) );
115 }
catch (
const std::bad_cast&) { };
158 : _entry(entry), _neighbors(neighbors)
161 virtual ~BundleFilter() {};
163 virtual dtn::data::Size limit()
const throw () {
return _entry.getFreeTransferSlots(); };
200 if (_neighbors.find(n) != _neighbors.end())
209 if (_entry.has(meta,
true))
222 const std::set<dtn::core::Node> &_neighbors;
229 std::set<dtn::core::Node> neighbors;
234 Task *t = _taskqueue.getnpop(
true);
235 std::auto_ptr<Task> killer(t);
246 SearchNextBundleTask &task =
dynamic_cast<SearchNextBundleTask&
>(*t);
267 const BundleFilter filter(entry, neighbors);
274 (**this).getSeeker().get(filter, list);
277 (**this).doHandshake(task.eid);
281 for (std::list<dtn::data::MetaBundle>::const_iterator iter = list.begin(); iter != list.end(); ++iter)
294 }
catch (
const std::bad_cast&) { };
298 }
catch (
const std::exception &ex) {
309 EpidemicRoutingExtension::SearchNextBundleTask::SearchNextBundleTask(
const dtn::data::EID &e)
313 EpidemicRoutingExtension::SearchNextBundleTask::~SearchNextBundleTask()
316 std::string EpidemicRoutingExtension::SearchNextBundleTask::toString()
318 return "SearchNextBundleTask: " + eid.getString();