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

@ -159,8 +159,12 @@ virtual int sendPkt(const void *data, int size, const struct sockaddr_in &to, in
int status(std::ostream &out);
int UdpPeersStatus(std::ostream &out);
void getDataTransferred(uint32_t &read, uint32_t &write, uint32_t &relay);
private:
void clearDataTransferred();
int removeUdpRelay_relayLocked(UdpRelayAddrSet *addrs);
int installRelayClass_relayLocked(int &classIdx, uint32_t &bandwidth);
int removeRelayClass_relayLocked(int classIdx);
@ -177,6 +181,7 @@ int UdpPeersStatus(std::ostream &out);
RsMutex udppeerMtx; /* for all class data (below) */
std::map<struct sockaddr_in, UdpPeer *> mPeers; /* indexed by <dest> */
uint32_t mReadBytes;
RsMutex relayMtx; /* for all class data (below) */
@ -187,6 +192,9 @@ int UdpPeersStatus(std::ostream &out);
void *mTmpSendPkt;
uint32_t mTmpSendSize;
uint32_t mWriteBytes;
uint32_t mRelayBytes;
};
/* utility functions for creating / extracting UdpRelayPackets */