mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
Added Bandwidth Monitoring service to libretroshare to help debug Lag.
- p3bwctrl.h/.cc & rsbwctrlitems.h/.cc - New Interface in pqihandler to extract the data. - New Interface in rsconfig to display in GUI. - Added extra debugging in pqistreamer for catching big outqueues. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5241 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0d3d1ebc18
commit
48a1c66c60
16 changed files with 880 additions and 31 deletions
|
@ -53,6 +53,19 @@ int fixme(char *str, int n);
|
|||
* For controlling data rates.
|
||||
* #define DEBUG_RATECAP 1
|
||||
*/
|
||||
|
||||
class RsBwRates
|
||||
{
|
||||
public:
|
||||
RsBwRates()
|
||||
:mRateIn(0), mRateOut(0), mMaxRateIn(0), mMaxRateOut(0) {return;}
|
||||
float mRateIn;
|
||||
float mRateOut;
|
||||
float mMaxRateIn;
|
||||
float mMaxRateOut;
|
||||
};
|
||||
|
||||
|
||||
class RateInterface
|
||||
{
|
||||
|
||||
|
@ -64,6 +77,15 @@ public:
|
|||
|
||||
virtual ~RateInterface() { return; }
|
||||
|
||||
virtual void getRates(RsBwRates &rates)
|
||||
{
|
||||
rates.mRateIn = bw_in;
|
||||
rates.mRateOut = bw_out;
|
||||
rates.mMaxRateIn = bwMax_in;
|
||||
rates.mMaxRateOut = bwMax_out;
|
||||
return;
|
||||
}
|
||||
|
||||
virtual float getRate(bool in)
|
||||
{
|
||||
if (in)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue