[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] dynamically connect.......



hi,
i am writing an application which needs to connect another  node dynamically(in C++) through TCP connection.
As the dynamic connection was not implemented in the ns-2.1b7a,i am trying to do that.But i could not get how to make two way connection.
 
Actually i made one way connection using agent_->connect(nodeid,portid)
and i added a connect(int,int) method in Agent.h....
that is
void Agent::connect(int addr,int port)
{
dst_.addr_=addr;
dst_.port_=port;
}
 
with this code i am able to establish one way communication only.
how can i make two way communication.where should i modify to make it work.
 
Thaks in advance
 
regards
edwin