* Read scene_throttle_bps from the config file and use it

* Minor formatting cleanup
This commit is contained in:
John Hurliman
2009-10-14 11:52:48 -07:00
parent 4b5a2f8c02
commit c033477d2f
2 changed files with 5 additions and 10 deletions

View File

@@ -138,15 +138,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Environment.TickCount Measurement
m_circuitManager = circuitManager;
int sceneThrottleBps = 0;
IConfig config = configSource.Configs["ClientStack.LindenUDP"];
if (config != null)
{
m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
}
// TODO: Config support for throttling the entire connection
m_throttle = new TokenBucket(null, 0, 0);
m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps);
m_throttleRates = new ThrottleRates(configSource);
}