58 const std::string EpidemicRoutingExtension::TAG =
"EpidemicRoutingExtension";
85 for (std::set<dtn::core::Node>::const_iterator iter = nl.begin(); iter != nl.end(); ++iter)
91 _taskqueue.push(
new SearchNextBundleTask( n.
getEID() ) );
95 }
catch (
const std::bad_cast&) { };
104 _taskqueue.push(
new SearchNextBundleTask( n.
getEID() ) );
108 _taskqueue.push(
new SearchNextBundleTask( n.
getEID() ) );
112 }
catch (
const std::bad_cast&) { };
120 _taskqueue.push(
new SearchNextBundleTask(ce.
peer) );
123 }
catch (
const std::bad_cast&) { };
131 _taskqueue.push(
new SearchNextBundleTask( handshake.
peer ) );
136 _taskqueue.push(
new SearchNextBundleTask( handshake.
peer ) );
139 }
catch (
const std::bad_cast&) { };
146 _taskqueue.push(
new SearchNextBundleTask( aborted.
getPeer() ) );
149 }
catch (
const std::bad_cast&) { };
156 _taskqueue.push(
new SearchNextBundleTask( completed.
getPeer() ) );
158 }
catch (
const std::bad_cast&) { };
200 virtual ~BundleFilter() {};
202 virtual dtn::data::Size limit()
const throw () {
return _entry.getFreeTransferSlots(); };
243 if (_entry.has(meta,
true))
264 Task *t = _taskqueue.getnpop(
true);
265 std::auto_ptr<Task> killer(t);
276 SearchNextBundleTask &task =
dynamic_cast<SearchNextBundleTask&
>(*t);
289 BundleFilter filter(entry);
296 (**this).getSeeker().get(filter, list);
299 (**this).doHandshake(task.eid);
303 for (std::list<dtn::data::MetaBundle>::const_iterator iter = list.begin(); iter != list.end(); ++iter)
313 }
catch (
const std::bad_cast&) { };
317 }
catch (
const std::exception &ex) {
328 EpidemicRoutingExtension::SearchNextBundleTask::SearchNextBundleTask(
const dtn::data::EID &e)
332 EpidemicRoutingExtension::SearchNextBundleTask::~SearchNextBundleTask()
335 std::string EpidemicRoutingExtension::SearchNextBundleTask::toString()
337 return "SearchNextBundleTask: " + eid.getString();