aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-14 16:48:27 -0700
committerJohn Hurliman2009-10-14 16:48:27 -0700
commit06990b074c17c2201ed379bf1ae4c7191ab3187f (patch)
treec15c9c46d3b139fc315f0f448e4f66d6bea0c553 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
parent* Clean up the SetThrottle() code and add a maxBurstRate parameter to allow m... (diff)
downloadopensim-SC_OLD-06990b074c17c2201ed379bf1ae4c7191ab3187f.zip
opensim-SC_OLD-06990b074c17c2201ed379bf1ae4c7191ab3187f.tar.gz
opensim-SC_OLD-06990b074c17c2201ed379bf1ae4c7191ab3187f.tar.bz2
opensim-SC_OLD-06990b074c17c2201ed379bf1ae4c7191ab3187f.tar.xz
Allow the LLUDP server to run in either synchronous or asynchronous mode with a config setting, defaulting to synchronous mode
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 890f701..545a0bc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -113,6 +113,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
113 /// is passed up to the operating system and used in the system networking 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> 114 /// stack. Use zero to leave this value as the default</summary>
115 private int m_recvBufferSize; 115 private int m_recvBufferSize;
116 /// <summary>Flag to process packets asynchronously or synchronously</summary>
117 private bool m_asyncPacketHandling;
116 118
117 /// <summary>The measured resolution of Environment.TickCount</summary> 119 /// <summary>The measured resolution of Environment.TickCount</summary>
118 public float TickCountResolution { get { return m_tickCountResolution; } } 120 public float TickCountResolution { get { return m_tickCountResolution; } }
@@ -143,6 +145,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
143 IConfig config = configSource.Configs["ClientStack.LindenUDP"]; 145 IConfig config = configSource.Configs["ClientStack.LindenUDP"];
144 if (config != null) 146 if (config != null)
145 { 147 {
148 m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false);
146 m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); 149 m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
147 sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); 150 sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
148 } 151 }
@@ -156,7 +159,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
156 if (m_scene == null) 159 if (m_scene == null)
157 throw new InvalidOperationException("[LLUDPSERVER]: Cannot LLUDPServer.Start() without an IScene reference"); 160 throw new InvalidOperationException("[LLUDPSERVER]: Cannot LLUDPServer.Start() without an IScene reference");
158 161
159 base.Start(m_recvBufferSize); 162 m_log.Info("[LLUDPSERVER]: Starting the LLUDP server in " + (m_asyncPacketHandling ? "asynchronous" : "synchronous") + " mode");
163
164 base.Start(m_recvBufferSize, m_asyncPacketHandling);
160 165
161 // Start the incoming packet processing thread 166 // Start the incoming packet processing thread
162 Thread incomingThread = new Thread(IncomingPacketHandler); 167 Thread incomingThread = new Thread(IncomingPacketHandler);