examples/tcp/tcp-nsc-zoo.cc
changeset 8966 060dba23e9bb
parent 7256 b04ba6772f8c
equal deleted inserted replaced
8965:cfed4f87e003 8966:060dba23e9bb
   124               continue;
   124               continue;
   125             }
   125             }
   126           Address remoteAddress (InetSocketAddress (ipv4Interfaces.GetAddress (j), servPort));
   126           Address remoteAddress (InetSocketAddress (ipv4Interfaces.GetAddress (j), servPort));
   127           OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress);
   127           OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress);
   128           clientHelper.SetAttribute 
   128           clientHelper.SetAttribute 
   129             ("OnTime", RandomVariableValue (ConstantVariable (1)));
   129             ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
   130           clientHelper.SetAttribute 
   130           clientHelper.SetAttribute 
   131             ("OffTime", RandomVariableValue (ConstantVariable (0)));
   131             ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
   132           ApplicationContainer clientApp = clientHelper.Install (n.Get (i));
   132           ApplicationContainer clientApp = clientHelper.Install (n.Get (i));
   133           clientApp.Start (Seconds (j)); /* delay startup depending on node number */
   133           clientApp.Start (Seconds (j)); /* delay startup depending on node number */
   134           clientApp.Stop (Seconds (j + runtime));
   134           clientApp.Stop (Seconds (j + runtime));
   135         }
   135         }
   136     }
   136     }