Significant improvements to DHT behaviour, and reconnection attempts.

* Added GUI interface for auto connect state.
 * Added HTTP retrieval and storage of DHT peers update.
 * Added code for partial recv() from DHT peers.
 * Disabled Chat/Disc/Udplayer/tcpstream debug output.
 * Added Unreachable Check to connMgr.
 * Added auto reconnect functions to connMgr (#define to disable).
 * Restructured DHT notify code... much cleaner.
 * DHT now flags out of date DHT results.
 * DHT notifies ConnMgr on any results (same or diff).
 * Added Fns to cleanup old udp connection.
 * other bugfixes.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@369 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-03-02 14:25:59 +00:00
parent 7b3fc2976e
commit 63828f77a8
20 changed files with 708 additions and 203 deletions

View file

@ -126,6 +126,8 @@ class peerConnectState
time_t lastcontact;
/***** Below here not stored permanently *****/
time_t lastavailable;
time_t lastattempt;
std::string name;
@ -139,7 +141,6 @@ class peerConnectState
/* a list of connect attempts to make (in order) */
bool inConnAttempt;
time_t lastattempt;
peerConnectAddress currentConnAddr;
std::list<peerConnectAddress> connAddrs;
@ -216,6 +217,7 @@ bool connectResult(std::string id, bool success, uint32_t flags);
protected:
/* Internal Functions */
void statusTick();
void netTick();
void netStartup();
@ -236,6 +238,7 @@ void netUpnpInit();
void netUpnpCheck();
void netUdpCheck();
void netUnreachableCheck();
/* Udp / Stun functions */
bool udpInternalAddress(struct sockaddr_in iaddr);
@ -249,6 +252,9 @@ void stunCollect(std::string id, struct sockaddr_in addr, uint32_t flags);
/* monitor control */
void tickMonitors();
/* connect attempts */
bool retryConnectTCP(std::string id);
bool retryConnectNotify(std::string id);
/* temporary for testing */
virtual void loadConfiguration() { return; }