aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs29
1 files changed, 12 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index 97d75e1..23118a2 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -26,19 +26,14 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections;
30using System.Collections.Generic; 29using System.Collections.Generic;
31using System.Net;
32using System.Net.Sockets; 30using System.Net.Sockets;
33using System.Threading; 31using System.Threading;
34using System.Timers; 32using System.Timers;
35using System.Reflection;
36using OpenMetaverse; 33using OpenMetaverse;
37using OpenMetaverse.Packets; 34using OpenMetaverse.Packets;
38using Timer = System.Timers.Timer;
39using OpenSim.Framework; 35using OpenSim.Framework;
40using OpenSim.Region.ClientStack.LindenUDP; 36using Timer=System.Timers.Timer;
41using log4net;
42 37
43namespace OpenSim.Region.ClientStack.LindenUDP 38namespace OpenSim.Region.ClientStack.LindenUDP
44{ 39{
@@ -96,7 +91,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
96 private Dictionary<uint, int> m_DupeTracker = 91 private Dictionary<uint, int> m_DupeTracker =
97 new Dictionary<uint, int>(); 92 new Dictionary<uint, int>();
98 private uint m_DupeTrackerWindow = 30; 93 private uint m_DupeTrackerWindow = 30;
99 private int m_DupeTrackerLastCheck = System.Environment.TickCount; 94 private int m_DupeTrackerLastCheck = Environment.TickCount;
100 95
101 // Values for the SimStatsReporter 96 // Values for the SimStatsReporter
102 // 97 //
@@ -164,7 +159,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
164 { 159 {
165 m_Client = client; 160 m_Client = client;
166 m_PacketServer = server; 161 m_PacketServer = server;
167 m_DropSafeTimeout = System.Environment.TickCount + 15000; 162 m_DropSafeTimeout = Environment.TickCount + 15000;
168 163
169 m_PacketQueue = new LLPacketQueue(client.AgentId, userSettings); 164 m_PacketQueue = new LLPacketQueue(client.AgentId, userSettings);
170 165
@@ -225,9 +220,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
225 // acks being appended to the payload, just don't send 220 // acks being appended to the payload, just don't send
226 // any with them until libsl is fixed. 221 // any with them until libsl is fixed.
227 // 222 //
228 if (packet is OpenMetaverse.Packets.ViewerEffectPacket) 223 if (packet is ViewerEffectPacket)
229 return; 224 return;
230 if (packet is OpenMetaverse.Packets.SimStatsPacket) 225 if (packet is SimStatsPacket)
231 return; 226 return;
232 227
233 // Add acks to outgoing packets 228 // Add acks to outgoing packets
@@ -261,7 +256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
261 item.Packet = packet; 256 item.Packet = packet;
262 item.Incoming = false; 257 item.Incoming = false;
263 item.throttleType = throttlePacketType; 258 item.throttleType = throttlePacketType;
264 item.TickCount = System.Environment.TickCount; 259 item.TickCount = Environment.TickCount;
265 item.Identifier = id; 260 item.Identifier = id;
266 item.Resends = 0; 261 item.Resends = 0;
267 item.Length = packet.ToBytes().Length; 262 item.Length = packet.ToBytes().Length;
@@ -272,7 +267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
272 267
273 private void ResendUnacked() 268 private void ResendUnacked()
274 { 269 {
275 int now = System.Environment.TickCount; 270 int now = Environment.TickCount;
276 271
277 int intervalMs = 250; 272 int intervalMs = 250;
278 273
@@ -341,7 +336,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
341 } 336 }
342 337
343 m_NeedAck[packet.Header.Sequence].TickCount = 338 m_NeedAck[packet.Header.Sequence].TickCount =
344 System.Environment.TickCount; 339 Environment.TickCount;
345 340
346 QueuePacket(packet, ThrottleOutPacketType.Resend, 341 QueuePacket(packet, ThrottleOutPacketType.Resend,
347 data.Identifier); 342 data.Identifier);
@@ -463,10 +458,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
463 if (m_DupeTracker.Count < 1024) 458 if (m_DupeTracker.Count < 1024)
464 return; 459 return;
465 460
466 if (System.Environment.TickCount - m_DupeTrackerLastCheck < 2000) 461 if (Environment.TickCount - m_DupeTrackerLastCheck < 2000)
467 return; 462 return;
468 463
469 m_DupeTrackerLastCheck = System.Environment.TickCount; 464 m_DupeTrackerLastCheck = Environment.TickCount;
470 465
471 Dictionary<uint, int> packs = 466 Dictionary<uint, int> packs =
472 new Dictionary<uint, int>(m_DupeTracker); 467 new Dictionary<uint, int>(m_DupeTracker);
@@ -673,7 +668,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
673 item.Packet = packet; 668 item.Packet = packet;
674 item.Incoming = false; 669 item.Incoming = false;
675 item.throttleType = 0; 670 item.throttleType = 0;
676 item.TickCount = System.Environment.TickCount; 671 item.TickCount = Environment.TickCount;
677 item.Identifier = 0; 672 item.Identifier = 0;
678 item.Resends = 0; 673 item.Resends = 0;
679 item.Length = packet.ToBytes().Length; 674 item.Length = packet.ToBytes().Length;
@@ -741,7 +736,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
741 m_UnackedBytes += item.Length; 736 m_UnackedBytes += item.Length;
742 737
743 // Keep track of when this packet was sent out 738 // Keep track of when this packet was sent out
744 item.TickCount = System.Environment.TickCount; 739 item.TickCount = Environment.TickCount;
745 740
746 m_NeedAck[packet.Header.Sequence] = item; 741 m_NeedAck[packet.Header.Sequence] = item;
747 } 742 }