* Reduced DHT default msg rate to 5/sec. (was 50/sec)

- At this level it takes significantly longer for the searches to complete, but
	  there are no DOS warnings on the router. This should hopefully make users happy.
 * Added DhtMode() Interface call to dynamically change this rate.
	- Can be switched between (HIGH: 50/sec, MED: 20/sec, LOW: 5/sec & TRICKLE: 3/sec)
 * Disable additional Queries if PotentialPeer Queue gets too big.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4703 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-12-01 17:19:30 +00:00
parent 8b40826940
commit ed18152596
7 changed files with 123 additions and 41 deletions

View file

@ -249,6 +249,14 @@ uint32_t UdpBitDht::statsBDVersionSize()
return mBitDhtManager->statsBDVersionSize();
}
uint32_t UdpBitDht::setDhtMode(uint32_t dhtFlags)
{
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
return mBitDhtManager->setDhtMode(dhtFlags);
}
/******************* Internals *************************/
/***** Iteration / Loop Management *****/

View file

@ -93,6 +93,7 @@ virtual int stopDht();
virtual int stateDht();
virtual uint32_t statsNetworkSize();
virtual uint32_t statsBDVersionSize();
virtual uint32_t setDhtMode(uint32_t dhtFlags);
/******************* Internals *************************/
/***** Iteration / Loop Management *****/