aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-14 11:43:31 -0700
committerJohn Hurliman2009-10-14 11:43:31 -0700
commit0d2e6463d714bce8a6a628bd647c625feeeae8f6 (patch)
tree1d4a805e65932c225a4c6a2b219b23840b3288a9 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
parent* Split Task category into Task and State (diff)
downloadopensim-SC-0d2e6463d714bce8a6a628bd647c625feeeae8f6.zip
opensim-SC-0d2e6463d714bce8a6a628bd647c625feeeae8f6.tar.gz
opensim-SC-0d2e6463d714bce8a6a628bd647c625feeeae8f6.tar.bz2
opensim-SC-0d2e6463d714bce8a6a628bd647c625feeeae8f6.tar.xz
* Minimized the number of times textures are pulled off the priority queue
* OnQueueEmpty is still called async, but will not be called for a given category if the previous callback for that category is still running. This is the most balanced behavior I could find, and seems to work well * Added support for the old [ClientStack.LindenUDP] settings (including setting the receive buffer size) and added the new token bucket and global throttle settings * Added the AssetLoaderEnabled config variable to optionally disable loading assets from XML every startup. This gives a dramatic improvement in startup times for those who don't need the functionality every startup
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 57fee59..1cfde91 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -109,6 +109,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
109 private Location m_location; 109 private Location m_location;
110 /// <summary>The measured resolution of Environment.TickCount</summary> 110 /// <summary>The measured resolution of Environment.TickCount</summary>
111 private float m_tickCountResolution; 111 private float m_tickCountResolution;
112 /// <summary>The size of the receive buffer for the UDP socket. This value
113 /// is passed up to the operating system and used in the system networking
114 /// stack. Use zero to leave this value as the default</summary>
115 private int m_recvBufferSize;
112 116
113 /// <summary>The measured resolution of Environment.TickCount</summary> 117 /// <summary>The measured resolution of Environment.TickCount</summary>
114 public float TickCountResolution { get { return m_tickCountResolution; } } 118 public float TickCountResolution { get { return m_tickCountResolution; } }
@@ -135,6 +139,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
135 139
136 m_circuitManager = circuitManager; 140 m_circuitManager = circuitManager;
137 141
142 IConfig config = configSource.Configs["ClientStack.LindenUDP"];
143 if (config != null)
144 {
145 m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
146 }
147
138 // TODO: Config support for throttling the entire connection 148 // TODO: Config support for throttling the entire connection
139 m_throttle = new TokenBucket(null, 0, 0); 149 m_throttle = new TokenBucket(null, 0, 0);
140 m_throttleRates = new ThrottleRates(configSource); 150 m_throttleRates = new ThrottleRates(configSource);
@@ -145,7 +155,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
145 if (m_scene == null) 155 if (m_scene == null)
146 throw new InvalidOperationException("[LLUDPSERVER]: Cannot LLUDPServer.Start() without an IScene reference"); 156 throw new InvalidOperationException("[LLUDPSERVER]: Cannot LLUDPServer.Start() without an IScene reference");
147 157
148 base.Start(); 158 base.Start(m_recvBufferSize);
149 159
150 // Start the incoming packet processing thread 160 // Start the incoming packet processing thread
151 Thread incomingThread = new Thread(IncomingPacketHandler); 161 Thread incomingThread = new Thread(IncomingPacketHandler);