diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index ca5501d..95a8e23 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |||
@@ -158,6 +158,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
158 | 158 | ||
159 | private int m_defaultRTO = 1000; // 1sec is the recommendation in the RFC | 159 | private int m_defaultRTO = 1000; // 1sec is the recommendation in the RFC |
160 | private int m_maxRTO = 60000; | 160 | private int m_maxRTO = 60000; |
161 | public bool m_deliverPackets = true; | ||
161 | 162 | ||
162 | /// <summary> | 163 | /// <summary> |
163 | /// Default constructor | 164 | /// Default constructor |
@@ -430,6 +431,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
430 | if (category >= 0 && category < m_packetOutboxes.Length) | 431 | if (category >= 0 && category < m_packetOutboxes.Length) |
431 | { | 432 | { |
432 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; | 433 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; |
434 | |||
435 | if (m_deliverPackets == false) | ||
436 | { | ||
437 | queue.Enqueue(packet); | ||
438 | return true; | ||
439 | } | ||
440 | |||
433 | TokenBucket bucket = m_throttleCategories[category]; | 441 | TokenBucket bucket = m_throttleCategories[category]; |
434 | 442 | ||
435 | // Don't send this packet if there is already a packet waiting in the queue | 443 | // Don't send this packet if there is already a packet waiting in the queue |
@@ -479,6 +487,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
479 | /// <returns>True if any packets were sent, otherwise false</returns> | 487 | /// <returns>True if any packets were sent, otherwise false</returns> |
480 | public bool DequeueOutgoing() | 488 | public bool DequeueOutgoing() |
481 | { | 489 | { |
490 | if (m_deliverPackets == false) return false; | ||
491 | |||
482 | OutgoingPacket packet; | 492 | OutgoingPacket packet; |
483 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; | 493 | OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; |
484 | TokenBucket bucket; | 494 | TokenBucket bucket; |