aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
diff options
context:
space:
mode:
authorMic Bowman2011-04-20 16:23:33 -0700
committerMic Bowman2011-04-20 16:23:33 -0700
commit2b737c9cc2e4a4ef3520d80225381a010bd1dc80 (patch)
tree7a7a5f9589aac513d7f439625ae78291e5255557 /OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
parentConverted the property request queue to use the same retransmission (diff)
downloadopensim-SC_OLD-2b737c9cc2e4a4ef3520d80225381a010bd1dc80.zip
opensim-SC_OLD-2b737c9cc2e4a4ef3520d80225381a010bd1dc80.tar.gz
opensim-SC_OLD-2b737c9cc2e4a4ef3520d80225381a010bd1dc80.tar.bz2
opensim-SC_OLD-2b737c9cc2e4a4ef3520d80225381a010bd1dc80.tar.xz
Adds the first pass at an adaptive throttle to slow start new
clients. If the sent packets are ack'ed successfully the throttle will open quickly up to the maximum specified by the client and/or the sims client throttle. This still needs a lot of adjustment to get the rates correct.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index d195110..b170964 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -130,6 +130,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
130 // is actually sent out again 130 // is actually sent out again
131 packet.TickCount = 0; 131 packet.TickCount = 0;
132 132
133 // As with other network applications, assume that an expired packet is
134 // an indication of some network problem, slow transmission
135 packet.Client.FlowThrottle.ExpirePackets(1);
136
133 expiredPackets.Add(packet); 137 expiredPackets.Add(packet);
134 } 138 }
135 } 139 }
@@ -157,6 +161,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
157 { 161 {
158 m_packets.Remove(pendingRemove.SequenceNumber); 162 m_packets.Remove(pendingRemove.SequenceNumber);
159 163
164 // As with other network applications, assume that an acknowledged packet is an
165 // indication that the network can handle a little more load, speed up the transmission
166 ackedPacket.Client.FlowThrottle.AcknowledgePackets(ackedPacket.Buffer.DataLength);
167
160 // Update stats 168 // Update stats
161 Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); 169 Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
162 170