tutorial/tutorial-star-routing.cc
changeset 2592 3ebf97150166
parent 2494 1c69ea12779c
child 2600 6c389d0c717d
equal deleted inserted replaced
2591:83a605082fb6 2592:3ebf97150166
   146     "255.255.255.252");
   146     "255.255.255.252");
   147 
   147 
   148   uint16_t port = 7;
   148   uint16_t port = 7;
   149 
   149 
   150   Ptr<UdpEchoClient> client = 
   150   Ptr<UdpEchoClient> client = 
   151     CreateObjectWith<UdpEchoClient> ("Node", n4, 
   151     CreateObject<UdpEchoClient> ("Node", n4, 
   152                                      "RemoteIpv4", Ipv4Address ("10.1.1.2"),
   152                                      "RemoteIpv4", Ipv4Address ("10.1.1.2"),
   153                                      "RemotePort", Uinteger (port), 
   153                                      "RemotePort", Uinteger (port), 
   154                                      "MaxPackets", Uinteger (1), 
   154                                      "MaxPackets", Uinteger (1), 
   155                                      "Interval", Seconds(1.), 
   155                                      "Interval", Seconds(1.), 
   156                                      "PacketSize", Uinteger (1024));
   156                                      "PacketSize", Uinteger (1024));
   157   n0->AddApplication (client);
   157   n0->AddApplication (client);
   158 
   158 
   159   Ptr<UdpEchoServer> server = 
   159   Ptr<UdpEchoServer> server = 
   160     CreateObjectWith<UdpEchoServer> ("Node", n1, 
   160     CreateObject<UdpEchoServer> ("Node", n1, 
   161                                      "Port", Uinteger (port));
   161                                      "Port", Uinteger (port));
   162   n1->AddApplication (server);
   162   n1->AddApplication (server);
   163 
   163 
   164   server->Start(Seconds(1.));
   164   server->Start(Seconds(1.));
   165   client->Start(Seconds(2.));
   165   client->Start(Seconds(2.));