--- a/tutorial/tutorial-point-to-point.cc Tue Feb 26 23:27:19 2008 +0100
+++ b/tutorial/tutorial-point-to-point.cc Wed Feb 27 00:05:23 2008 +0100
@@ -28,6 +28,8 @@
#include "ns3/ascii-trace.h"
#include "ns3/pcap-trace.h"
#include "ns3/global-route-manager.h"
+#include "ns3/inet-socket-address.h"
+#include "ns3/uinteger.h"
NS_LOG_COMPONENT_DEFINE ("PointToPointSimulation");
@@ -58,10 +60,19 @@
uint16_t port = 7;
- Ptr<UdpEchoClient> client = CreateObject<UdpEchoClient> (n0, "10.1.1.2",
- port, 1, Seconds(1.), 1024);
+ Ptr<UdpEchoClient> client =
+ CreateObjectWith<UdpEchoClient> ("Node", n0,
+ "RemoteIpv4", Ipv4Address ("10.1.1.2"),
+ "RemotePort", Uinteger (port),
+ "MaxPackets", Uinteger (1),
+ "Interval", Seconds(1.),
+ "PacketSize", Uinteger (1024));
+ n0->AddApplication (client);
- Ptr<UdpEchoServer> server = CreateObject<UdpEchoServer> (n1, port);
+ Ptr<UdpEchoServer> server =
+ CreateObjectWith<UdpEchoServer> ("Node", n1,
+ "Port", Uinteger (port));
+ n1->AddApplication (server);
server->Start(Seconds(1.));
client->Start(Seconds(2.));