added control over TR forward rate, so that we can experiment with it on large bandwidth servers

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4918 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-02-10 22:23:06 +00:00
parent f6c88667c4
commit fd83e5950f
6 changed files with 143 additions and 43 deletions
retroshare-gui/src/gui/settings

View file

@ -30,6 +30,7 @@
#include <retroshare/rsiface.h>
#include <retroshare/rspeers.h>
#include <retroshare/rsturtle.h>
#include <QTimer>
@ -42,6 +43,7 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags)
connect( ui.netModeComboBox, SIGNAL( activated ( int ) ), this, SLOT( toggleUPnP( ) ) );
connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) );
connect( ui.allowTunnelConnectionCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) );
connect( ui._max_tr_up_per_sec_SB, SIGNAL( valueChanged( int ) ), this, SLOT( updateMaxTRUpRate(int) ) );
QTimer *timer = new QTimer(this);
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
@ -74,6 +76,11 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags)
#endif
}
void ServerPage::updateMaxTRUpRate(int b)
{
rsTurtle->setMaxTRForwardRate(b) ;
}
void ServerPage::toggleIpDetermination(bool b)
{
rsPeers->allowServerIPDetermination(b) ;
@ -185,6 +192,8 @@ void ServerPage::load()
ui.dynDNS -> setText(QString::fromStdString(detail.dyndns));
ui.showDiscStatusBar->setChecked(Settings->getStatusBarFlags() & STATUSBAR_DISC);
ui._max_tr_up_per_sec_SB->setValue(rsTurtle->getMaxTRForwardRate()) ;
}
/** Loads the settings for this page */