mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 04:22:27 -04:00
Done most of the piping/callback between the DHT and LinkMgr/NetMgr.
* Added ConnectionFeedback fn to NetAssistConnect & p3BitDht. * Added TYPE definitions to pqiassist.h * added extra parameters to p3LinkMgr::connectAttempt() (flags which will be used to pass DIRECT/PROXY/DIRECT + PASSIVE/ACTIVE) * Added callback from p3LinkMgr to NetMgr::netAssistStatusUpdate() => Dht::ConnectionFeedback. * updated peerConnectRequest to trigger either TCP attempt (first) or UDP connection. * updated parameters for p3LinkMgrIMPL::tryConnectUDP() * added p3LinkMgrIMPL::locked_ConnectAttempt_SpecificAddress() for DHT => TCP attempt. * added extra parameter to addAddressIfUnique... bool addFront => DHT attempts get pushed to front of Queue due to timing requirements. * added extra parameter (flags) to pqiperson::connect() - matches extra parameters to p3LinkMgr::connectAttempt(). * added p3NetMgr::netAssistStatusUpdate() * added mConnectFlags to pqissludp git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4443 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8d5bde1b50
commit
387db6e7b6
15 changed files with 275 additions and 49 deletions
|
@ -1306,6 +1306,24 @@ bool p3NetMgrIMPL::netAssistFriend(std::string id, bool on)
|
|||
}
|
||||
|
||||
|
||||
|
||||
bool p3NetMgrIMPL::netAssistStatusUpdate(std::string id, int state)
|
||||
{
|
||||
std::map<uint32_t, pqiNetAssistConnect *>::iterator it;
|
||||
|
||||
#ifdef NETMGR_DEBUG
|
||||
std::cerr << "p3NetMgrIMPL::netAssistFriend(" << id << ", " << on << ")";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
for(it = mDhts.begin(); it != mDhts.end(); it++)
|
||||
{
|
||||
(it->second)->ConnectionFeedback(id, state);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool p3NetMgrIMPL::netAssistSetAddress( struct sockaddr_in &laddr,
|
||||
struct sockaddr_in &eaddr,
|
||||
uint32_t mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue