mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
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.
This commit is contained in:
@@ -130,6 +130,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
// is actually sent out again
|
||||
packet.TickCount = 0;
|
||||
|
||||
// As with other network applications, assume that an expired packet is
|
||||
// an indication of some network problem, slow transmission
|
||||
packet.Client.FlowThrottle.ExpirePackets(1);
|
||||
|
||||
expiredPackets.Add(packet);
|
||||
}
|
||||
}
|
||||
@@ -157,6 +161,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
m_packets.Remove(pendingRemove.SequenceNumber);
|
||||
|
||||
// As with other network applications, assume that an acknowledged packet is an
|
||||
// indication that the network can handle a little more load, speed up the transmission
|
||||
ackedPacket.Client.FlowThrottle.AcknowledgePackets(ackedPacket.Buffer.DataLength);
|
||||
|
||||
// Update stats
|
||||
Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user