diff options
author | John Hurliman | 2009-10-13 10:38:35 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-13 10:38:35 -0700 |
commit | 3828b3c0e86bbb444dabadcc6e509675b058639e (patch) | |
tree | e630d7c0377ac2a066ce27f095efd27df34dd324 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |
parent | Merge branch 'master' into htb-throttle (diff) | |
download | opensim-SC_OLD-3828b3c0e86bbb444dabadcc6e509675b058639e.zip opensim-SC_OLD-3828b3c0e86bbb444dabadcc6e509675b058639e.tar.gz opensim-SC_OLD-3828b3c0e86bbb444dabadcc6e509675b058639e.tar.bz2 opensim-SC_OLD-3828b3c0e86bbb444dabadcc6e509675b058639e.tar.xz |
* Eliminated unnecessary parameters from LLUDPServer.SendPacketData()
* Changed PrimMesher's Quat.Identity to return <0,0,0,1> instead of <0,0,0,1.1>
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index fcb2cd0..07764cb 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -210,7 +210,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
210 | byte[] data = datas[i]; | 210 | byte[] data = datas[i]; |
211 | m_clients.ForEach( | 211 | m_clients.ForEach( |
212 | delegate(LLUDPClient client) | 212 | delegate(LLUDPClient client) |
213 | { SendPacketData(client, data, data.Length, packet.Type, packet.Header.Zerocoded, category); }); | 213 | { SendPacketData(client, data, packet.Type, category); }); |
214 | } | 214 | } |
215 | } | 215 | } |
216 | else | 216 | else |
@@ -218,7 +218,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
218 | byte[] data = packet.ToBytes(); | 218 | byte[] data = packet.ToBytes(); |
219 | m_clients.ForEach( | 219 | m_clients.ForEach( |
220 | delegate(LLUDPClient client) | 220 | delegate(LLUDPClient client) |
221 | { SendPacketData(client, data, data.Length, packet.Type, packet.Header.Zerocoded, category); }); | 221 | { SendPacketData(client, data, packet.Type, category); }); |
222 | } | 222 | } |
223 | } | 223 | } |
224 | 224 | ||
@@ -239,18 +239,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
239 | for (int i = 0; i < packetCount; i++) | 239 | for (int i = 0; i < packetCount; i++) |
240 | { | 240 | { |
241 | byte[] data = datas[i]; | 241 | byte[] data = datas[i]; |
242 | SendPacketData(client, data, data.Length, packet.Type, packet.Header.Zerocoded, category); | 242 | SendPacketData(client, data, packet.Type, category); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | else | 245 | else |
246 | { | 246 | { |
247 | byte[] data = packet.ToBytes(); | 247 | byte[] data = packet.ToBytes(); |
248 | SendPacketData(client, data, data.Length, packet.Type, packet.Header.Zerocoded, category); | 248 | SendPacketData(client, data, packet.Type, category); |
249 | } | 249 | } |
250 | } | 250 | } |
251 | 251 | ||
252 | public void SendPacketData(LLUDPClient client, byte[] data, int dataLength, PacketType type, bool doZerocode, ThrottleOutPacketType category) | 252 | public void SendPacketData(LLUDPClient client, byte[] data, PacketType type, ThrottleOutPacketType category) |
253 | { | 253 | { |
254 | int dataLength = data.Length; | ||
255 | bool doZerocode = (data[0] & Helpers.MSG_ZEROCODED) != 0; | ||
256 | |||
254 | // Frequency analysis of outgoing packet sizes shows a large clump of packets at each end of the spectrum. | 257 | // Frequency analysis of outgoing packet sizes shows a large clump of packets at each end of the spectrum. |
255 | // The vast majority of packets are less than 200 bytes, although due to asset transfers and packet splitting | 258 | // The vast majority of packets are less than 200 bytes, although due to asset transfers and packet splitting |
256 | // there are a decent number of packets in the 1000-1140 byte range. We allocate one of two sizes of data here | 259 | // there are a decent number of packets in the 1000-1140 byte range. We allocate one of two sizes of data here |