diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 0b05ed9..4a7bdfe 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -571,23 +571,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
571 | //Sorry, i know it's not optimal, but until the LL client | 571 | //Sorry, i know it's not optimal, but until the LL client |
572 | //manages packets correctly and re-orders them as required, this is necessary. | 572 | //manages packets correctly and re-orders them as required, this is necessary. |
573 | 573 | ||
574 | if (outgoingPacket.Type == PacketType.ImprovedTerseObjectUpdate | 574 | |
575 | || outgoingPacket.Type == PacketType.ChatFromSimulator | 575 | // Put the UDP payload on the wire |
576 | || outgoingPacket.Type == PacketType.ObjectUpdate | 576 | if (outgoingPacket.Type == PacketType.ImprovedTerseObjectUpdate) |
577 | || outgoingPacket.Type == PacketType.LayerData) | ||
578 | { | 577 | { |
579 | sendSynchronous = true; | 578 | SyncBeginPrioritySend(buffer, 2); // highest priority |
580 | } | 579 | } |
581 | 580 | else if (outgoingPacket.Type == PacketType.ObjectUpdate | |
582 | // Put the UDP payload on the wire | 581 | || outgoingPacket.Type == PacketType.ChatFromSimulator |
583 | if (sendSynchronous == true) | 582 | || outgoingPacket.Type == PacketType.LayerData) |
584 | { | 583 | { |
585 | SyncBeginSend(buffer); | 584 | SyncBeginPrioritySend(buffer, 1); // medium priority |
586 | } | 585 | } |
587 | else | 586 | else |
588 | { | 587 | { |
589 | AsyncBeginSend(buffer); | 588 | SyncBeginPrioritySend(buffer, 0); // normal priority |
590 | } | 589 | } |
590 | |||
591 | //AsyncBeginSend(buffer); | ||
592 | |||
591 | // Keep track of when this packet was sent out (right now) | 593 | // Keep track of when this packet was sent out (right now) |
592 | outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; | 594 | outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; |
593 | } | 595 | } |
@@ -862,7 +864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
862 | 864 | ||
863 | Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length); | 865 | Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length); |
864 | 866 | ||
865 | AsyncBeginSend(buffer); | 867 | SyncBeginPrioritySend(buffer, 1); //Setting this to a medium priority should help minimise resends |
866 | } | 868 | } |
867 | 869 | ||
868 | private bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo) | 870 | private bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo) |