Changes to support the delay / bandwidth changes in libbitdht

* switched off the TESTING PERIODS.
 * added BASE PROXY wait time.
 * Increased PEERNET_CONNECT_TIMEOUT to 120
 * Prevented connection startup with Request underway (dpd->mPeerReqState == RSDHT_PEERREQ_RUNNING)
 * corrected calculation of Exclusive Delay (Target of MIN_DETERMINISTIC_SWITCH_PERIOD = 60 secs).
 * don't do UDP Failed ConnectLogic update when connection was initiated remotely.
 * Extended UdpRelay to allow flexible Bandwidth limits in the future.
 * Added Timeout for Relays (30min for unknowns - 2hrs for friends).
 * Extract bandwidth from UdpRelay, at installation.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4463 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-07-17 23:41:30 +00:00
parent 551e2594bb
commit 96ec46478a
6 changed files with 174 additions and 61 deletions

View file

@ -204,17 +204,17 @@ int NodeCallback(const bdId *id, uint32_t peerflags);
int PeerCallback(const bdId *id, uint32_t status);
int ValueCallback(const bdNodeId *id, std::string key, uint32_t status);
int ConnectCallback(const bdId *srcId, const bdId *proxyId, const bdId *destId,
uint32_t mode, uint32_t point, uint32_t cbtype, uint32_t errcode);
uint32_t mode, uint32_t point, uint32_t param, uint32_t cbtype, uint32_t errcode);
int OnlinePeerCallback_locked(const bdId *id, uint32_t status, DhtPeerDetails *dpd);
int UnreachablePeerCallback_locked(const bdId *id, uint32_t status, DhtPeerDetails *dpd);
//int tick();
int minuteTick();
int doActions();
int checkProxyAllowed(const bdId *srcId, const bdId *destId, int mode);
int checkProxyAllowed(const bdId *srcId, const bdId *destId, int mode, uint32_t &bandwidth);
int checkConnectionAllowed(const bdId *peerId, int mode);
void initiateConnection(const bdId *srcId, const bdId *proxyId, const bdId *destId, uint32_t mode, uint32_t loc, uint32_t answer);
int installRelayConnection(const bdId *srcId, const bdId *destId);
void initiateConnection(const bdId *srcId, const bdId *proxyId, const bdId *destId, uint32_t mode, uint32_t loc, uint32_t delayOrBandwidth);
int installRelayConnection(const bdId *srcId, const bdId *destId, uint32_t &bandwidth);
int removeRelayConnection(const bdId *srcId, const bdId *destId);
void monitorConnections();