examples/tcp-small-transfer.cc
changeset 2602 d9262bff6df2
parent 2600 6c389d0c717d
equal deleted inserted replaced
2601:4297e8c61615 2602:d9262bff6df2
   189   localSocket->Bind ();
   189   localSocket->Bind ();
   190 
   190 
   191   // Create a packet sink to receive these packets
   191   // Create a packet sink to receive these packets
   192   Ptr<PacketSink> sink = 
   192   Ptr<PacketSink> sink = 
   193     CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   193     CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   194                               "Protocol", TypeId::LookupByName ("Tcp"));
   194                               "Protocol", TypeId::LookupByName ("ns3::Tcp"));
   195   n2->AddApplication (sink);
   195   n2->AddApplication (sink);
   196   sink->Start (Seconds (0.0));
   196   sink->Start (Seconds (0.0));
   197   sink->Stop (Seconds (100.0));
   197   sink->Stop (Seconds (100.0));
   198 
   198 
   199   Simulator::Schedule(Seconds(0), &StartFlow, localSocket, nBytes,
   199   Simulator::Schedule(Seconds(0), &StartFlow, localSocket, nBytes,