c++ - how to use maidsafe-rudp as part of my project? -


i download source code in https://github.com/maidsafe/maidsafe-rudp.

i built , compiled source code , got link library. not know how program interface while client cannot communicate 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 cut <node.bootstrap> 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 problem     return setupnetwork();  }else {     std::cout<<"setupnetwork successful!!"<<std::endl; } 

}

question two: sever-part,what interface need use recv message ?

question three:do server-part need use interface:bootstrap?

from documentation in github, know that:

the library's interface provided in 4 head files:

managed_connections.h- main api.

i tried use interface given in head file still not know how?


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -