diff options
author | John Hurliman | 2009-10-14 11:52:48 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-14 11:52:48 -0700 |
commit | c033477d2faf1449685d471db243651f132a7632 (patch) | |
tree | 8a91e154e13634439f0ef06678cd6e7dbe611c69 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |
parent | Merge branch 'htb-throttle' of ssh://opensimulator.org/var/git/opensim into h... (diff) | |
download | opensim-SC-c033477d2faf1449685d471db243651f132a7632.zip opensim-SC-c033477d2faf1449685d471db243651f132a7632.tar.gz opensim-SC-c033477d2faf1449685d471db243651f132a7632.tar.bz2 opensim-SC-c033477d2faf1449685d471db243651f132a7632.tar.xz |
* Read scene_throttle_bps from the config file and use it
* Minor formatting cleanup
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 1cfde91..384eda7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -138,15 +138,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
138 | #endregion Environment.TickCount Measurement | 138 | #endregion Environment.TickCount Measurement |
139 | 139 | ||
140 | m_circuitManager = circuitManager; | 140 | m_circuitManager = circuitManager; |
141 | int sceneThrottleBps = 0; | ||
141 | 142 | ||
142 | IConfig config = configSource.Configs["ClientStack.LindenUDP"]; | 143 | IConfig config = configSource.Configs["ClientStack.LindenUDP"]; |
143 | if (config != null) | 144 | if (config != null) |
144 | { | 145 | { |
145 | m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); | 146 | m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); |
147 | sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); | ||
146 | } | 148 | } |
147 | 149 | ||
148 | // TODO: Config support for throttling the entire connection | 150 | // TODO: Config support for throttling the entire connection |
149 | m_throttle = new TokenBucket(null, 0, 0); | 151 | m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps); |
150 | m_throttleRates = new ThrottleRates(configSource); | 152 | m_throttleRates = new ThrottleRates(configSource); |
151 | } | 153 | } |
152 | 154 | ||