ns-3 用户!我是 ns-3 的新手,请帮助我在这里理解一些东西:http: //code.nsnam.org/ns-3-dev/file/tip/examples/wireless/wifi-simple-adhoc-grid.cc
我在这里无法理解某些内容(从 209 到 217 的行):
$ TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (c.Get (sinkNode), tid); //sinkNode=0
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
Ptr<Socket> source = Socket::CreateSocket (c.Get (sourceNode), tid);
InetSocketAddress remote = InetSocketAddress (i.GetAddress (sinkNode, 0), 80);
source->Connect (remote);$
这里发生了什么?仅供参考:附加代码。
请帮我!谢谢你们!:)