diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientViewBase.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientViewBase.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs index 7d39405..f105978 100644 --- a/OpenSim/Region/ClientStack/ClientViewBase.cs +++ b/OpenSim/Region/ClientStack/ClientViewBase.cs | |||
@@ -27,17 +27,14 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | using System; | 29 | using System; |
30 | using System.Collections; | ||
31 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
32 | using libsecondlife; | ||
33 | using libsecondlife.Packets; | ||
34 | using System.Net; | 31 | using System.Net; |
35 | using System.Net.Sockets; | 32 | using System.Net.Sockets; |
36 | using System.IO; | ||
37 | using System.Threading; | ||
38 | using System.Timers; | 33 | using System.Timers; |
34 | using libsecondlife; | ||
35 | using libsecondlife.Packets; | ||
36 | using OpenSim.Framework.Console; | ||
39 | using OpenSim.Framework.Utilities; | 37 | using OpenSim.Framework.Utilities; |
40 | using OpenSim.Framework.Interfaces; | ||
41 | 38 | ||
42 | namespace OpenSim.Region.ClientStack | 39 | namespace OpenSim.Region.ClientStack |
43 | { | 40 | { |
@@ -47,7 +44,7 @@ namespace OpenSim.Region.ClientStack | |||
47 | protected Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>(); | 44 | protected Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>(); |
48 | protected Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>(); | 45 | protected Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>(); |
49 | 46 | ||
50 | protected System.Timers.Timer AckTimer; | 47 | protected Timer AckTimer; |
51 | protected uint Sequence = 0; | 48 | protected uint Sequence = 0; |
52 | protected object SequenceLock = new object(); | 49 | protected object SequenceLock = new object(); |
53 | protected const int MAX_APPENDED_ACKS = 10; | 50 | protected const int MAX_APPENDED_ACKS = 10; |
@@ -159,7 +156,7 @@ namespace OpenSim.Region.ClientStack | |||
159 | } | 156 | } |
160 | catch (Exception) | 157 | catch (Exception) |
161 | { | 158 | { |
162 | OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); | 159 | MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); |
163 | this.KillThread(); | 160 | this.KillThread(); |
164 | } | 161 | } |
165 | 162 | ||
@@ -195,8 +192,8 @@ namespace OpenSim.Region.ClientStack | |||
195 | else if ((NewPack.Type == PacketType.StartPingCheck)) | 192 | else if ((NewPack.Type == PacketType.StartPingCheck)) |
196 | { | 193 | { |
197 | //reply to pingcheck | 194 | //reply to pingcheck |
198 | libsecondlife.Packets.StartPingCheckPacket startPing = (libsecondlife.Packets.StartPingCheckPacket)NewPack; | 195 | StartPingCheckPacket startPing = (StartPingCheckPacket)NewPack; |
199 | libsecondlife.Packets.CompletePingCheckPacket endPing = new CompletePingCheckPacket(); | 196 | CompletePingCheckPacket endPing = new CompletePingCheckPacket(); |
200 | endPing.PingID.PingID = startPing.PingID.PingID; | 197 | endPing.PingID.PingID = startPing.PingID.PingID; |
201 | OutPacket(endPing); | 198 | OutPacket(endPing); |
202 | } | 199 | } |
@@ -224,7 +221,7 @@ namespace OpenSim.Region.ClientStack | |||
224 | { | 221 | { |
225 | if (Pack.Header.Reliable) | 222 | if (Pack.Header.Reliable) |
226 | { | 223 | { |
227 | libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket(); | 224 | PacketAckPacket ack_it = new PacketAckPacket(); |
228 | ack_it.Packets = new PacketAckPacket.PacketsBlock[1]; | 225 | ack_it.Packets = new PacketAckPacket.PacketsBlock[1]; |
229 | ack_it.Packets[0] = new PacketAckPacket.PacketsBlock(); | 226 | ack_it.Packets[0] = new PacketAckPacket.PacketsBlock(); |
230 | ack_it.Packets[0].ID = Pack.Header.Sequence; | 227 | ack_it.Packets[0].ID = Pack.Header.Sequence; |
@@ -254,7 +251,7 @@ namespace OpenSim.Region.ClientStack | |||
254 | { | 251 | { |
255 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) | 252 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) |
256 | { | 253 | { |
257 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " + | 254 | MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " + |
258 | (now - packet.TickCount) + "ms have passed"); | 255 | (now - packet.TickCount) + "ms have passed"); |
259 | 256 | ||
260 | packet.Header.Resent = true; | 257 | packet.Header.Resent = true; |
@@ -273,7 +270,7 @@ namespace OpenSim.Region.ClientStack | |||
273 | if (PendingAcks.Count > 250) | 270 | if (PendingAcks.Count > 250) |
274 | { | 271 | { |
275 | // FIXME: Handle the odd case where we have too many pending ACKs queued up | 272 | // FIXME: Handle the odd case where we have too many pending ACKs queued up |
276 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Too many ACKs queued up!"); | 273 | MainLog.Instance.Verbose( "Too many ACKs queued up!"); |
277 | return; | 274 | return; |
278 | } | 275 | } |
279 | 276 | ||