Attempt at fixing the Disconnection issue.

* Added DataRate accounting to Relay and Dht.
 * Rates are exposed through rsDht.h interface.
 * Added LastIncomingTS() to pqistreamer.
 * Turned HeartBeat reset() into a warning.
 * Added NoPacket in 60 sec reset().
 * Minor typos/errors corrected.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4818 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-01-19 16:23:57 +00:00
parent 7dc0cd6b0f
commit 4aec00a0c2
12 changed files with 212 additions and 9 deletions

View file

@ -369,6 +369,8 @@ int pqistreamer::handleincomingitem(RsItem *pqi)
pqioutput(PQL_DEBUG_ALL, pqistreamerzone, out.str());
}
#endif
// timestamp last received packet.
mLastIncomingTs = time(NULL);
// Use overloaded Contact function
pqi -> PeerId(PeerId());
@ -376,6 +378,11 @@ int pqistreamer::handleincomingitem(RsItem *pqi)
return 1;
}
time_t pqistreamer::getLastIncomingTS()
{
return mLastIncomingTs;
}
int pqistreamer::handleoutgoing()
{
RsStackMutex stack(streamerMtx) ; // lock out_pkt and out_data