1
ns-3用户! 我新手在NS-3 请帮我理解的东西在这里: http://code.nsnam.org/ns-3-dev/file/tip/examples/wireless/wifi-simple-adhoc-grid.ccns-3源代码
我不能在这里明白的地方(线从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);$
这是怎么回事这里? 只是FYI:代码附加。
请帮助我! 谢谢大家! :)