mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 20:42:29 -04:00
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:
parent
7dc0cd6b0f
commit
4aec00a0c2
12 changed files with 212 additions and 9 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue