mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Add AgentUpdate to PacketPool. This is the most common inbound packet from viewers.
This commit is contained in:
@@ -90,6 +90,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
StatsManager.RegisterStat(m_blocksReusedStat);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a packet of the given type.
|
||||
/// </summary>
|
||||
/// <param name='type'></param>
|
||||
/// <returns>Guaranteed to always return a packet, whether from the pool or newly constructed.</returns>
|
||||
public Packet GetPacket(PacketType type)
|
||||
{
|
||||
m_packetsReusedStat.Consequent++;
|
||||
@@ -160,7 +165,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
PacketType type = GetType(bytes);
|
||||
|
||||
Array.Clear(zeroBuffer, 0, zeroBuffer.Length);
|
||||
// Array.Clear(zeroBuffer, 0, zeroBuffer.Length);
|
||||
|
||||
int i = 0;
|
||||
Packet packet = GetPacket(type);
|
||||
@@ -207,6 +212,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
switch (packet.Type)
|
||||
{
|
||||
// List pooling packets here
|
||||
case PacketType.AgentUpdate:
|
||||
case PacketType.PacketAck:
|
||||
case PacketType.ObjectUpdate:
|
||||
case PacketType.ImprovedTerseObjectUpdate:
|
||||
|
||||
Reference in New Issue
Block a user