diff options
author | Mic Bowman | 2011-04-20 16:23:33 -0700 |
---|---|---|
committer | Mic Bowman | 2011-04-20 16:23:33 -0700 |
commit | 2b737c9cc2e4a4ef3520d80225381a010bd1dc80 (patch) | |
tree | 7a7a5f9589aac513d7f439625ae78291e5255557 /OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | |
parent | Converted the property request queue to use the same retransmission (diff) | |
download | opensim-SC-2b737c9cc2e4a4ef3520d80225381a010bd1dc80.zip opensim-SC-2b737c9cc2e4a4ef3520d80225381a010bd1dc80.tar.gz opensim-SC-2b737c9cc2e4a4ef3520d80225381a010bd1dc80.tar.bz2 opensim-SC-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.cs | 8 |
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 | ||