0

I download the source code in https://github.com/maidsafe/MaidSafe-RUDP.

I built and compiled the source code and I got the link library. I do not know how to program with its interface while the client cannot communicate with server,as listed below:

int  SetUpNetwork(){
EndpointPair endpoints0,endpoints1;

endpoints0.local=Endpoint(boost::asio::ip::address::from_string("127.0.0.1"),2468); endpoints1.local=Endpoint(boost::asio::ip::address::from_string("127.0.0.1"),4268);

 NodeId chosen_node_id,node_chosen_bootstrap_peer;
 int result0;
 maidsafe::rudp::helper::Node node(34);
result0=node.Bootstrap(std::vector<Endpoint>(1,endpoints0.local),chosen_node_id,
                        endpoints1.local);//here i cut the <node.bootstrap> from sample-code

if(result0==kBindError){
    std::cerr<<"errorX1\n\n\n\n";
}
if(result0!=kSuccess){
    std::cerr<<"errorX2\n\n\n";  //------->> Question one:i cannot handle this problem
    return SetUpNetwork();

}else {
    std::cout<<"setupNetwork successful!!"<<std::endl;
}

}

Question two: for the sever-part,what interface do i need to use to recv message ?

Question Three:do the server-part need to use the interface:bootstrap?

From the documentation in github, we know that:

The library's interface is provided in the 4 head files:

managed_connections.h- this is the main API.

I tried to use the interface given in head file but still do not know how?

lidehua
  • 13
  • 6

0 Answers0