mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Integrated NetStateBox and Activated Stunners.
* Added tick() and setRefreshPeriod() to pqiAddrAssist * Fixed up NETSTATE #defines, all refer to retroshare/rsconfig.h * added #define => string translations for NETSTATEs * Added NetStateBox as an independent Network State determination (has no effect on existing code). * added slowTick() to p3NetMgr. * connected p3NetMgr::getNet... to NetStateBox. * piped network state into NetStateBox. * added p3NetMgr check for changes in NatType. (to update Stun Rate / Attach Mode (TODO)) * added NetStateBox.reset() * tweaked lots of debugging. * added Default Stun Period (pass -1 to setRefreshPeriod()) git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4435 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
52cbe0f2fb
commit
6c5d5f6cc2
10 changed files with 684 additions and 181 deletions
|
@ -33,6 +33,8 @@
|
|||
//#include "pqi/p3upnpmgr.h"
|
||||
#include "pqi/pqiassist.h"
|
||||
|
||||
#include "pqi/pqinetstatebox.h"
|
||||
|
||||
#include "pqi/p3cfgmgr.h"
|
||||
|
||||
#include "util/rsthreads.h"
|
||||
|
@ -98,6 +100,7 @@ void setManagers(p3PeerMgr *peerMgr, p3LinkMgr *linkMgr);
|
|||
void setAddrAssist(pqiAddrAssist *dhtStun, pqiAddrAssist *proxyStun);
|
||||
|
||||
void tick();
|
||||
void slowTick();
|
||||
|
||||
/*************** Setup ***************************/
|
||||
void addNetAssistConnect(uint32_t type, pqiNetAssistConnect *);
|
||||
|
@ -201,6 +204,13 @@ void netUpnpCheck();
|
|||
|
||||
void netUnreachableCheck();
|
||||
|
||||
|
||||
/* net state via NetStateBox */
|
||||
void updateNetStateBox_temporal();
|
||||
void updateNetStateBox_startup();
|
||||
void updateNetStateBox_reset();
|
||||
void updateNatSetting();
|
||||
|
||||
private:
|
||||
// These should have there own Mutex Protection,
|
||||
ExtAddrFinder *mExtAddrFinder ;
|
||||
|
@ -238,6 +248,15 @@ void netStatusReset_locked();
|
|||
/* network status flags (read by rsiface) */
|
||||
pqiNetStatus mNetFlags;
|
||||
pqiNetStatus mOldNetFlags;
|
||||
|
||||
|
||||
// Improved NetStatusBox, which uses the Stunners!
|
||||
pqiNetStateBox mNetStateBox;
|
||||
|
||||
time_t mLastSlowTickTime;
|
||||
uint32_t mOldNatType;
|
||||
uint32_t mOldNatHole;
|
||||
|
||||
};
|
||||
|
||||
#endif // MRK_PQI_NET_MANAGER_HEADER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue