examples/simple-p2p.cc
changeset 479 eefc92272862
parent 473 7692c5266fe6
child 480 7cf532738f61
--- a/examples/simple-p2p.cc	Wed May 02 11:37:52 2007 +0200
+++ b/examples/simple-p2p.cc	Wed May 02 11:38:21 2007 +0200
@@ -133,6 +133,7 @@
   n0->GetApplicationList()->Add(ooff0);
   // Start the application
   ooff0->Start(Seconds(1.0));
+  ooff0->Stop (Seconds(10.0));
 
   // Create a similar flow from n3 to n1, starting at time 1.1 seconds
   OnOffApplication* ooff1 = new OnOffApplication(
@@ -147,6 +148,7 @@
   n3->GetApplicationList()->Add(ooff1);
   // Start the application
   ooff1->Start(Seconds(1.1));
+  ooff1->Stop (Seconds(10.0));
 
   // Here, finish off packet routing configuration
   // This will likely set by some global StaticRouting object in the future
@@ -164,8 +166,6 @@
   trace.TraceAllIp ();
 #endif
 
-  Simulator::StopAt (Seconds(10.0));
-
   Simulator::Run ();
 
   n0->Dispose ();