mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 08:35:45 -04:00
Added Random Timeouts / Retries to p3bitdht level.
* Fixed UdpRelay Interface Output. * added more variables to ConnectStateBox. * Changed Wait logic from sec since last attempt, to explicit attemptTS. * Improved PeerConnectStateBox::connectState(). * Added RETRY_ATTEMPT updateCB. * removed stupid clearing of addresses (killed Relay connections). * added more debugging git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4455 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a63173b19e
commit
a5c77d02e7
4 changed files with 198 additions and 63 deletions
|
@ -213,18 +213,23 @@ void convertDhtPeerDetailsToRsDhtNetPeer(RsDhtNetPeer &status, const DhtPeerDeta
|
|||
|
||||
void convertUdpRelayEndtoRsDhtRelayEnd(RsDhtRelayEnd &end, const UdpRelayEnd &int_end)
|
||||
{
|
||||
std::ostringstream addr;
|
||||
addr << rs_inet_ntoa(int_end.mLocalAddr.sin_addr) << ":" << ntohs(int_end.mLocalAddr.sin_port);
|
||||
end.mLocalAddr = addr.str();
|
||||
{
|
||||
std::ostringstream addr;
|
||||
addr << rs_inet_ntoa(int_end.mLocalAddr.sin_addr) << ":" << ntohs(int_end.mLocalAddr.sin_port);
|
||||
end.mLocalAddr = addr.str();
|
||||
}
|
||||
|
||||
addr.clear();
|
||||
addr << rs_inet_ntoa(int_end.mProxyAddr.sin_addr) << ":" << ntohs(int_end.mProxyAddr.sin_port);
|
||||
end.mProxyAddr = addr.str();
|
||||
{
|
||||
std::ostringstream addr;
|
||||
addr << rs_inet_ntoa(int_end.mProxyAddr.sin_addr) << ":" << ntohs(int_end.mProxyAddr.sin_port);
|
||||
end.mProxyAddr = addr.str();
|
||||
}
|
||||
|
||||
|
||||
addr.clear();
|
||||
addr << rs_inet_ntoa(int_end.mRemoteAddr.sin_addr) << ":" << ntohs(int_end.mRemoteAddr.sin_port);
|
||||
end.mRemoteAddr = addr.str();
|
||||
{
|
||||
std::ostringstream addr;
|
||||
addr << rs_inet_ntoa(int_end.mRemoteAddr.sin_addr) << ":" << ntohs(int_end.mRemoteAddr.sin_port);
|
||||
end.mRemoteAddr = addr.str();
|
||||
}
|
||||
|
||||
end.mCreateTS = 0;
|
||||
return;
|
||||
|
@ -232,13 +237,17 @@ void convertUdpRelayEndtoRsDhtRelayEnd(RsDhtRelayEnd &end, const UdpRelayEnd &in
|
|||
|
||||
void convertUdpRelayProxytoRsDhtRelayProxy(RsDhtRelayProxy &proxy, const UdpRelayProxy &int_proxy)
|
||||
{
|
||||
std::ostringstream addr;
|
||||
addr << rs_inet_ntoa(int_proxy.mAddrs.mSrcAddr.sin_addr) << ":" << ntohs(int_proxy.mAddrs.mSrcAddr.sin_port);
|
||||
proxy.mSrcAddr = addr.str();
|
||||
{
|
||||
std::ostringstream addr;
|
||||
addr << rs_inet_ntoa(int_proxy.mAddrs.mSrcAddr.sin_addr) << ":" << ntohs(int_proxy.mAddrs.mSrcAddr.sin_port);
|
||||
proxy.mSrcAddr = addr.str();
|
||||
}
|
||||
|
||||
addr.clear();
|
||||
addr << rs_inet_ntoa(int_proxy.mAddrs.mDestAddr.sin_addr) << ":" << ntohs(int_proxy.mAddrs.mDestAddr.sin_port);
|
||||
proxy.mDestAddr = addr.str();
|
||||
{
|
||||
std::ostringstream addr;
|
||||
addr << rs_inet_ntoa(int_proxy.mAddrs.mDestAddr.sin_addr) << ":" << ntohs(int_proxy.mAddrs.mDestAddr.sin_port);
|
||||
proxy.mDestAddr = addr.str();
|
||||
}
|
||||
|
||||
proxy.mBandwidth = int_proxy.mBandwidth;
|
||||
proxy.mRelayClass = int_proxy.mRelayClass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue