59 n1, "10.1.1.2"); |
59 n1, "10.1.1.2"); |
60 |
60 |
61 uint16_t port = 7; |
61 uint16_t port = 7; |
62 |
62 |
63 Ptr<UdpEchoClient> client = |
63 Ptr<UdpEchoClient> client = |
64 CreateObject<UdpEchoClient> ("Node", n0, |
64 CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"), |
65 "RemoteIpv4", Ipv4Address ("10.1.1.2"), |
65 "RemotePort", Uinteger (port), |
66 "RemotePort", Uinteger (port), |
66 "MaxPackets", Uinteger (1), |
67 "MaxPackets", Uinteger (1), |
67 "Interval", Seconds(1.), |
68 "Interval", Seconds(1.), |
68 "PacketSize", Uinteger (1024)); |
69 "PacketSize", Uinteger (1024)); |
|
70 n0->AddApplication (client); |
69 n0->AddApplication (client); |
71 |
70 |
72 Ptr<UdpEchoServer> server = |
71 Ptr<UdpEchoServer> server = |
73 CreateObject<UdpEchoServer> ("Node", n1, |
72 CreateObject<UdpEchoServer> ("Port", Uinteger (port)); |
74 "Port", Uinteger (port)); |
|
75 n1->AddApplication (server); |
73 n1->AddApplication (server); |
76 |
74 |
77 server->Start(Seconds(1.)); |
75 server->Start(Seconds(1.)); |
78 client->Start(Seconds(2.)); |
76 client->Start(Seconds(2.)); |
79 |
77 |