diff options
author | Justin Clark-Casey (justincc) | 2012-10-12 01:39:37 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-12 01:39:37 +0100 |
commit | 21d0cbf7038cfb1b1010310a0f4b455cf9ab700d (patch) | |
tree | 8c5da5b12384379c57c8c424f2745ef7e02f1173 /OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | |
parent | BulletSim: fix problem with some shapes (like cylinders) being implemented as... (diff) | |
download | opensim-SC_OLD-21d0cbf7038cfb1b1010310a0f4b455cf9ab700d.zip opensim-SC_OLD-21d0cbf7038cfb1b1010310a0f4b455cf9ab700d.tar.gz opensim-SC_OLD-21d0cbf7038cfb1b1010310a0f4b455cf9ab700d.tar.bz2 opensim-SC_OLD-21d0cbf7038cfb1b1010310a0f4b455cf9ab700d.tar.xz |
Add AgentUpdate to PacketPool. This is the most common inbound packet from viewers.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs index a8a1bfe..052d334 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | |||
@@ -90,6 +90,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
90 | StatsManager.RegisterStat(m_blocksReusedStat); | 90 | StatsManager.RegisterStat(m_blocksReusedStat); |
91 | } | 91 | } |
92 | 92 | ||
93 | /// <summary> | ||
94 | /// Gets a packet of the given type. | ||
95 | /// </summary> | ||
96 | /// <param name='type'></param> | ||
97 | /// <returns>Guaranteed to always return a packet, whether from the pool or newly constructed.</returns> | ||
93 | public Packet GetPacket(PacketType type) | 98 | public Packet GetPacket(PacketType type) |
94 | { | 99 | { |
95 | m_packetsReusedStat.Consequent++; | 100 | m_packetsReusedStat.Consequent++; |
@@ -160,7 +165,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
160 | { | 165 | { |
161 | PacketType type = GetType(bytes); | 166 | PacketType type = GetType(bytes); |
162 | 167 | ||
163 | Array.Clear(zeroBuffer, 0, zeroBuffer.Length); | 168 | // Array.Clear(zeroBuffer, 0, zeroBuffer.Length); |
164 | 169 | ||
165 | int i = 0; | 170 | int i = 0; |
166 | Packet packet = GetPacket(type); | 171 | Packet packet = GetPacket(type); |
@@ -207,6 +212,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
207 | switch (packet.Type) | 212 | switch (packet.Type) |
208 | { | 213 | { |
209 | // List pooling packets here | 214 | // List pooling packets here |
215 | case PacketType.AgentUpdate: | ||
210 | case PacketType.PacketAck: | 216 | case PacketType.PacketAck: |
211 | case PacketType.ObjectUpdate: | 217 | case PacketType.ObjectUpdate: |
212 | case PacketType.ImprovedTerseObjectUpdate: | 218 | case PacketType.ImprovedTerseObjectUpdate: |