mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
new computing for download and upload rate. No more indiv rate settings
Merge branch 'maxUploadRate' git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1293 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9d0f90d434
commit
646603d71d
13 changed files with 381 additions and 542 deletions
|
@ -75,8 +75,9 @@ virtual int SendRsRawItem(RsRawItem *);
|
|||
virtual RsRawItem *GetRsRawItem();
|
||||
|
||||
// rate control.
|
||||
void setMaxIndivRate(bool in, float val);
|
||||
float getMaxIndivRate(bool in);
|
||||
//indiv rate is deprecated
|
||||
//void setMaxIndivRate(bool in, float val);
|
||||
//float getMaxIndivRate(bool in);
|
||||
void setMaxRate(bool in, float val);
|
||||
float getMaxRate(bool in);
|
||||
|
||||
|
@ -118,24 +119,24 @@ void locked_StoreCurrentRates(float in, float out);
|
|||
float rateTotal_out;
|
||||
};
|
||||
|
||||
inline void pqihandler::setMaxIndivRate(bool in, float val)
|
||||
{
|
||||
RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
|
||||
if (in)
|
||||
rateIndiv_in = val;
|
||||
else
|
||||
rateIndiv_out = val;
|
||||
return;
|
||||
}
|
||||
|
||||
inline float pqihandler::getMaxIndivRate(bool in)
|
||||
{
|
||||
RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
|
||||
if (in)
|
||||
return rateIndiv_in;
|
||||
else
|
||||
return rateIndiv_out;
|
||||
}
|
||||
//inline void pqihandler::setMaxIndivRate(bool in, float val)
|
||||
//{
|
||||
// RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
|
||||
// if (in)
|
||||
// rateIndiv_in = val;
|
||||
// else
|
||||
// rateIndiv_out = val;
|
||||
// return;
|
||||
//}
|
||||
//
|
||||
//inline float pqihandler::getMaxIndivRate(bool in)
|
||||
//{
|
||||
// RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
|
||||
// if (in)
|
||||
// return rateIndiv_in;
|
||||
// else
|
||||
// return rateIndiv_out;
|
||||
//}
|
||||
|
||||
inline void pqihandler::setMaxRate(bool in, float val)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue