aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs9
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs (renamed from OpenSim/Framework/PacketPool.cs)8
3 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index d05ffea..0869bd5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5862,7 +5862,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5862 msgpack.MessageBlock.ID, 5862 msgpack.MessageBlock.ID,
5863 msgpack.MessageBlock.Offline != 0 ? true : false, 5863 msgpack.MessageBlock.Offline != 0 ? true : false,
5864 msgpack.MessageBlock.Position, 5864 msgpack.MessageBlock.Position,
5865 msgpack.MessageBlock.BinaryBucket); 5865 msgpack.MessageBlock.BinaryBucket,
5866 true);
5866 5867
5867 handlerInstantMessage(this, im); 5868 handlerInstantMessage(this, im);
5868 } 5869 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 55780d6..d11fcbf 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -222,6 +222,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
222 m_pausedAckTimeout = 1000 * 300; // 5 minutes 222 m_pausedAckTimeout = 1000 * 300; // 5 minutes
223 } 223 }
224 224
225 // FIXME: This actually only needs to be done once since the PacketPool is shared across all servers.
226 // However, there is no harm in temporarily doing it multiple times.
227 IConfig packetConfig = configSource.Configs["PacketPool"];
228 if (packetConfig != null)
229 {
230 PacketPool.Instance.RecyclePackets = packetConfig.GetBoolean("RecyclePackets", true);
231 PacketPool.Instance.RecycleDataBlocks = packetConfig.GetBoolean("RecycleDataBlocks", true);
232 }
233
225 #region BinaryStats 234 #region BinaryStats
226 config = configSource.Configs["Statistics.Binary"]; 235 config = configSource.Configs["Statistics.Binary"];
227 m_shouldCollectStats = false; 236 m_shouldCollectStats = false;
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
index 41d17c5..fc9406b 100644
--- a/OpenSim/Framework/PacketPool.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
@@ -32,9 +32,8 @@ using OpenMetaverse;
32using OpenMetaverse.Packets; 32using OpenMetaverse.Packets;
33using log4net; 33using log4net;
34 34
35namespace OpenSim.Framework 35namespace OpenSim.Region.ClientStack.LindenUDP
36{ 36{
37
38 public sealed class PacketPool 37 public sealed class PacketPool
39 { 38 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -44,6 +43,9 @@ namespace OpenSim.Framework
44 private bool packetPoolEnabled = true; 43 private bool packetPoolEnabled = true;
45 private bool dataBlockPoolEnabled = true; 44 private bool dataBlockPoolEnabled = true;
46 45
46 /// <summary>
47 /// Pool of packets available for reuse.
48 /// </summary>
47 private readonly Dictionary<PacketType, Stack<Packet>> pool = new Dictionary<PacketType, Stack<Packet>>(); 49 private readonly Dictionary<PacketType, Stack<Packet>> pool = new Dictionary<PacketType, Stack<Packet>>();
48 50
49 private static Dictionary<Type, Stack<Object>> DataBlocks = 51 private static Dictionary<Type, Stack<Object>> DataBlocks =
@@ -244,4 +246,4 @@ namespace OpenSim.Framework
244 } 246 }
245 } 247 }
246 } 248 }
247} 249} \ No newline at end of file