refactor: Move OpenSim.Framework.PacketPool to OpenSim.Region.Clientstack.Linden.UDP

This is to allow it to use OpenSim.Framework.Monitoring in the future.
This is also a better location since the packet pool is linden udp specific
0.7.4-extended
Justin Clark-Casey (justincc) 2012-10-05 01:12:56 +01:00
parent 1f869ab36d
commit 5162ebd2cc
1 changed files with 5 additions and 3 deletions

View File

@ -32,9 +32,8 @@ using OpenMetaverse;
using OpenMetaverse.Packets;
using log4net;
namespace OpenSim.Framework
namespace OpenSim.Region.ClientStack.LindenUDP
{
public sealed class PacketPool
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -44,6 +43,9 @@ namespace OpenSim.Framework
private bool packetPoolEnabled = true;
private bool dataBlockPoolEnabled = true;
/// <summary>
/// Pool of packets available for reuse.
/// </summary>
private readonly Dictionary<PacketType, Stack<Packet>> pool = new Dictionary<PacketType, Stack<Packet>>();
private static Dictionary<Type, Stack<Object>> DataBlocks =
@ -244,4 +246,4 @@ namespace OpenSim.Framework
}
}
}
}
}