diff options
author | unknown | 2009-11-15 21:38:38 +0100 |
---|---|---|
committer | Melanie | 2009-11-15 19:40:58 +0000 |
commit | 28aa8010b2b47b73c6b867ff8f6284f98f12f37a (patch) | |
tree | 9a35f65f3550bfd03ccd6de5a8e79e6746bf4065 /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |
parent | Make GroupRootUpdate be a terse update. This method is not used by opensim (i... (diff) | |
download | opensim-SC-28aa8010b2b47b73c6b867ff8f6284f98f12f37a.zip opensim-SC-28aa8010b2b47b73c6b867ff8f6284f98f12f37a.tar.gz opensim-SC-28aa8010b2b47b73c6b867ff8f6284f98f12f37a.tar.bz2 opensim-SC-28aa8010b2b47b73c6b867ff8f6284f98f12f37a.tar.xz |
- Lower TIME_MS_TOLERANCE to 200ms - Allow m_updateFlag to be reset to 0 in the event of a terse update being rejected - Re-add a synchronous SendTo for certain types of packets
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index c773c05..0b05ed9 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -399,6 +399,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
399 | #region Queue or Send | 399 | #region Queue or Send |
400 | 400 | ||
401 | OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category); | 401 | OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category); |
402 | outgoingPacket.Type = type; | ||
402 | 403 | ||
403 | if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket)) | 404 | if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket)) |
404 | SendPacketFinal(outgoingPacket); | 405 | SendPacketFinal(outgoingPacket); |
@@ -510,6 +511,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
510 | byte flags = buffer.Data[0]; | 511 | byte flags = buffer.Data[0]; |
511 | bool isResend = (flags & Helpers.MSG_RESENT) != 0; | 512 | bool isResend = (flags & Helpers.MSG_RESENT) != 0; |
512 | bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0; | 513 | bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0; |
514 | bool sendSynchronous = false; | ||
513 | LLUDPClient udpClient = outgoingPacket.Client; | 515 | LLUDPClient udpClient = outgoingPacket.Client; |
514 | 516 | ||
515 | if (!udpClient.IsConnected) | 517 | if (!udpClient.IsConnected) |
@@ -565,9 +567,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
565 | if (isReliable) | 567 | if (isReliable) |
566 | Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength); | 568 | Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength); |
567 | 569 | ||
568 | // Put the UDP payload on the wire | 570 | //Some packet types need to be sent synchonously. |
569 | AsyncBeginSend(buffer); | 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. | ||
573 | |||
574 | if (outgoingPacket.Type == PacketType.ImprovedTerseObjectUpdate | ||
575 | || outgoingPacket.Type == PacketType.ChatFromSimulator | ||
576 | || outgoingPacket.Type == PacketType.ObjectUpdate | ||
577 | || outgoingPacket.Type == PacketType.LayerData) | ||
578 | { | ||
579 | sendSynchronous = true; | ||
580 | } | ||
570 | 581 | ||
582 | // Put the UDP payload on the wire | ||
583 | if (sendSynchronous == true) | ||
584 | { | ||
585 | SyncBeginSend(buffer); | ||
586 | } | ||
587 | else | ||
588 | { | ||
589 | AsyncBeginSend(buffer); | ||
590 | } | ||
571 | // Keep track of when this packet was sent out (right now) | 591 | // Keep track of when this packet was sent out (right now) |
572 | outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; | 592 | outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; |
573 | } | 593 | } |