mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-19 19:38:57 -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
|
@ -378,7 +378,7 @@ int pqiperson::stoplistening()
|
|||
return 1;
|
||||
}
|
||||
|
||||
int pqiperson::connect(uint32_t type, struct sockaddr_in raddr, uint32_t delay, uint32_t period, uint32_t timeout)
|
||||
int pqiperson::connect(uint32_t type, struct sockaddr_in raddr, uint32_t delay, uint32_t period, uint32_t timeout, uint32_t flags)
|
||||
{
|
||||
#ifdef PERSON_DEBUG
|
||||
{
|
||||
|
@ -390,6 +390,7 @@ int pqiperson::connect(uint32_t type, struct sockaddr_in raddr, uint32_t delay,
|
|||
out << " delay: " << delay;
|
||||
out << " period: " << period;
|
||||
out << " timeout: " << timeout;
|
||||
out << " flags: " << flags;
|
||||
out << std::endl;
|
||||
std::cerr << out.str();
|
||||
//pqioutput(PQL_DEBUG_BASIC, pqipersonzone, out.str());
|
||||
|
@ -416,6 +417,9 @@ int pqiperson::connect(uint32_t type, struct sockaddr_in raddr, uint32_t delay,
|
|||
return 0;
|
||||
}
|
||||
|
||||
std::cerr << "pqiperson::connect() WARNING, resetting for new connection attempt" << std::endl;
|
||||
#ifdef PERSON_DEBUG
|
||||
#endif
|
||||
/* set the parameters */
|
||||
(it->second)->reset();
|
||||
|
||||
|
@ -425,6 +429,7 @@ int pqiperson::connect(uint32_t type, struct sockaddr_in raddr, uint32_t delay,
|
|||
(it->second)->connect_parameter(NET_PARAM_CONNECT_DELAY, delay);
|
||||
(it->second)->connect_parameter(NET_PARAM_CONNECT_PERIOD, period);
|
||||
(it->second)->connect_parameter(NET_PARAM_CONNECT_TIMEOUT, timeout);
|
||||
(it->second)->connect_parameter(NET_PARAM_CONNECT_FLAGS, flags);
|
||||
|
||||
(it->second)->connect(raddr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue