Hello everyone!
My problem already exist here in the forum, but nobody responded the question.
I want implement an extra argument in the method receive.
Example:
void ReceivePacket (Ptr<Socket> socket, Ptr<Socket> dest)
{
while (socket->Recv ())
{
NS_LOG_UNCOND ("Node " << socket->GetNode()->GetId() << " received one packet!");
dest->Send (Create<Packet>());
}
dest->Close();
}
//in the main function
Ptr<Socket> dest = Socket::CreateSocket ( ... );
intermediary->SetRecvCallback (MakeCallback(&ReceivePacket, dest));
The problem is than when I do this occurs errors.