2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Run DefaultBtMessageDispatcher::
	checkRequestSlotAndDoNecessaryThing()
	in every 1 sec. The timeout of RequestSlot is 60s by default and
	it doesn't need to be called every time when
	DefaultBtInteractive::doInteractionProcessing() is called.	
	* src/DefaultBtInteractive.cc
	* src/DefaultBtInteractive.h
pull/1/head
Tatsuhiro Tsujikawa 2009-03-27 16:12:09 +00:00
parent ce1231280a
commit a69f499ccf
3 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,13 @@
2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Run
DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing()
in every 1 sec. The timeout of RequestSlot is 60s by default and
it doesn't need to be called every time when
DefaultBtInteractive::doInteractionProcessing() is called.
* src/DefaultBtInteractive.cc
* src/DefaultBtInteractive.h
2009-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Documented 'falloc' in man page.

View File

@ -438,8 +438,10 @@ void DefaultBtInteractive::doInteractionProcessing() {
detectMessageFlooding();
dispatcher->checkRequestSlotAndDoNecessaryThing();
if(_perSecCheckPoint.elapsed(1)) {
_perSecCheckPoint.reset();
dispatcher->checkRequestSlotAndDoNecessaryThing();
}
checkHave();
sendKeepAlive();

View File

@ -123,6 +123,7 @@ private:
FloodingStat floodingStat;
Time inactiveCheckPoint;
Time _pexCheckPoint;
Time _perSecCheckPoint;
time_t keepAliveInterval;
bool _utPexEnabled;
bool _dhtEnabled;