CcnxConsumer doubles timeout upon NACK and Timout
diff --git a/apps/ccnx-consumer-batches.cc b/apps/ccnx-consumer-batches.cc
index da95d48..2a86817 100644
--- a/apps/ccnx-consumer-batches.cc
+++ b/apps/ccnx-consumer-batches.cc
@@ -80,7 +80,7 @@
CcnxConsumerBatches::ScheduleNextPacket ()
{
if (!m_sendEvent.IsRunning ())
- m_sendEvent = Simulator::Schedule (Seconds(0.00001), &CcnxConsumer::SendPacket, this);
+ m_sendEvent = Simulator::Schedule (Seconds (m_rtt->RetransmitTimeout ().ToDouble (Time::S) * 0.1), &CcnxConsumer::SendPacket, this);
}
///////////////////////////////////////////////////
diff --git a/apps/ccnx-consumer.cc b/apps/ccnx-consumer.cc
index edac879..e4ebcd3 100644
--- a/apps/ccnx-consumer.cc
+++ b/apps/ccnx-consumer.cc
@@ -314,6 +314,7 @@
m_retxSeqs.insert (seq);
NS_LOG_INFO ("After: " << m_retxSeqs.size ());
+ m_rtt->IncreaseMultiplier (); // Double the next RTO ??
ScheduleNextPacket ();
}
@@ -322,6 +323,7 @@
{
// std::cout << Simulator::Now () << ", TO: " << sequenceNumber << ", current RTO: " << m_rtt->RetransmitTimeout ().ToDouble (Time::S) << "s\n";
+ m_rtt->IncreaseMultiplier (); // Double the next RTO
m_rtt->SentSeq (SequenceNumber32 (sequenceNumber), 1); // make sure to disable RTT calculation for this sample
m_retxSeqs.insert (sequenceNumber);
ScheduleNextPacket ();
diff --git a/examples/base-experiment.h b/examples/base-experiment.h
index ef20ab4..3c9e710 100644
--- a/examples/base-experiment.h
+++ b/examples/base-experiment.h
@@ -169,7 +169,7 @@
{
cout << "Run Simulation.\n";
Simulator::Stop (finishTime);
- Simulator::Schedule (Seconds (1.0), PrintTime);
+ Simulator::Schedule (Seconds (5.0), PrintTime);
Simulator::Run ();
Simulator::Destroy ();
cout << "Done.\n";