From 452750347b178ff5d2dbd366f3459fee759baebc Mon Sep 17 00:00:00 2001 From: "Mohit P. Tahiliani" Date: Sun, 20 Mar 2022 18:30:18 +0530 Subject: [PATCH] examples: Hook trace source after application starts in BBR example --- examples/tcp/tcp-bbr-example.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/tcp/tcp-bbr-example.cc b/examples/tcp/tcp-bbr-example.cc index d00e1bdb3..50f15df80 100644 --- a/examples/tcp/tcp-bbr-example.cc +++ b/examples/tcp/tcp-bbr-example.cc @@ -200,8 +200,9 @@ int main (int argc, char *argv []) BulkSendHelper source ("ns3::TcpSocketFactory", InetSocketAddress (ir1.GetAddress (1), port)); source.SetAttribute ("MaxBytes", UintegerValue (0)); ApplicationContainer sourceApps = source.Install (sender.Get (0)); - sourceApps.Start (Seconds (0.0)); - Simulator::Schedule (Seconds (0.2), &TraceCwnd, 0, 0); + sourceApps.Start (Seconds (0.1)); + // Hook trace source after application starts + Simulator::Schedule (Seconds (0.1) + MilliSeconds (1), &TraceCwnd, 0, 0); sourceApps.Stop (stopTime); // Install application on the receiver