Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Installing applications
- // Consumer
- ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerBatches");
- // Consumer will request /prefix/0, /prefix/1, ...
- consumerHelper.SetPrefix ("/prefix");
- consumerHelper.SetAttribute ("Batches", StringValue("1s 1"));
- consumerHelper.Install (nodes.Get (0)); // first node
- // Producer
- ndn::AppHelper producerHelper ("ns3::ndn::Producer");
- // Producer will reply to all requests starting with /prefix
- producerHelper.SetPrefix ("/prefix");
- producerHelper.Install (nodes.Get (2)); // last node
- Simulator::Stop (Seconds (2.0));
- Simulator::Run ();
- Simulator::Destroy ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment