examples/tcp/star.cc
changeset 8966 060dba23e9bb
parent 7256 b04ba6772f8c
equal deleted inserted replaced
8965:cfed4f87e003 8966:060dba23e9bb
    86 
    86 
    87   //
    87   //
    88   // Create OnOff applications to send TCP to the hub, one on each spoke node.
    88   // Create OnOff applications to send TCP to the hub, one on each spoke node.
    89   //
    89   //
    90   OnOffHelper onOffHelper ("ns3::TcpSocketFactory", Address ());
    90   OnOffHelper onOffHelper ("ns3::TcpSocketFactory", Address ());
    91   onOffHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
    91   onOffHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
    92   onOffHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
    92   onOffHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
    93 
    93 
    94   ApplicationContainer spokeApps;
    94   ApplicationContainer spokeApps;
    95 
    95 
    96   for (uint32_t i = 0; i < star.SpokeCount (); ++i)
    96   for (uint32_t i = 0; i < star.SpokeCount (); ++i)
    97     {
    97     {