aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
diff options
context:
space:
mode:
authorCasperW2009-12-20 16:18:43 +0100
committerCasperW2009-12-20 16:18:43 +0100
commit31bf25d05e09395416c0427e783f8685a9e69889 (patch)
treec93df3f7792b9ac7dad35500aa1cfbcf0d840253 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
parentAdd cmSetWindlightSceneTargeted. Add restrictions on windlight script use. (diff)
downloadopensim-SC-31bf25d05e09395416c0427e783f8685a9e69889.zip
opensim-SC-31bf25d05e09395416c0427e783f8685a9e69889.tar.gz
opensim-SC-31bf25d05e09395416c0427e783f8685a9e69889.tar.bz2
opensim-SC-31bf25d05e09395416c0427e783f8685a9e69889.tar.xz
Reverted my changes to jhurliman's packet stack since it currently causes more problems than it resolves. The stack DOES need a rework particularly with regards to priorities, but this is not it.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs27
1 files changed, 3 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 4d9f58f..3c4fa72 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -402,7 +402,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
402 #region Queue or Send 402 #region Queue or Send
403 403
404 OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category); 404 OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category);
405 outgoingPacket.Type = type;
406 405
407 if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket)) 406 if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket))
408 SendPacketFinal(outgoingPacket); 407 SendPacketFinal(outgoingPacket);
@@ -514,7 +513,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
514 byte flags = buffer.Data[0]; 513 byte flags = buffer.Data[0];
515 bool isResend = (flags & Helpers.MSG_RESENT) != 0; 514 bool isResend = (flags & Helpers.MSG_RESENT) != 0;
516 bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0; 515 bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
517 bool sendSynchronous = false;
518 LLUDPClient udpClient = outgoingPacket.Client; 516 LLUDPClient udpClient = outgoingPacket.Client;
519 517
520 if (!udpClient.IsConnected) 518 if (!udpClient.IsConnected)
@@ -570,28 +568,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
570 if (isReliable) 568 if (isReliable)
571 Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength); 569 Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength);
572 570
573 //Some packet types need to be sent synchonously.
574 //Sorry, i know it's not optimal, but until the LL client
575 //manages packets correctly and re-orders them as required, this is necessary.
576
577
578 // Put the UDP payload on the wire 571 // Put the UDP payload on the wire
579 if (outgoingPacket.Type == PacketType.ImprovedTerseObjectUpdate) 572 AsyncBeginSend(buffer);
580 { 573
581 SyncBeginPrioritySend(buffer, 2); // highest priority
582 }
583 else if (outgoingPacket.Type == PacketType.ObjectUpdate
584 || outgoingPacket.Type == PacketType.LayerData)
585 {
586 SyncBeginPrioritySend(buffer, 1); // medium priority
587 }
588 else
589 {
590 SyncBeginPrioritySend(buffer, 0); // normal priority
591 }
592
593 //AsyncBeginSend(buffer);
594
595 // Keep track of when this packet was sent out (right now) 574 // Keep track of when this packet was sent out (right now)
596 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; 575 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
597 } 576 }
@@ -872,7 +851,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
872 851
873 Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length); 852 Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length);
874 853
875 SyncBeginPrioritySend(buffer, 1); //Setting this to a medium priority should help minimise resends 854 AsyncBeginSend(buffer);
876 } 855 }
877 856
878 private bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo) 857 private bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo)