Add a method to determine the count of packets in a throttle

prioritization
Melanie 2009-10-01 22:35:57 +01:00
parent 7c1fdb2540
commit 54a912bb9c
3 changed files with 27 additions and 0 deletions

View File

@ -78,5 +78,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
void SetClientInfo(ClientInfo info);
void AddImportantPacket(PacketType type);
void RemoveImportantPacket(PacketType type);
int GetQueueCount(ThrottleOutPacketType queue);
}
}

View File

@ -863,5 +863,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_PacketQueue.Close();
Thread.CurrentThread.Abort();
}
public int GetQueueCount(ThrottleOutPacketType queue)
{
return m_PacketQueue.GetQueueCount(queue);
}
}
}

View File

@ -753,5 +753,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
get { return throttleMultiplier; }
}
public int GetQueueCount(ThrottleOutPacketType queue)
{
switch (queue)
{
case ThrottleOutPacketType.Land:
return LandOutgoingPacketQueue.Count;
case ThrottleOutPacketType.Wind:
return WindOutgoingPacketQueue.Count;
case ThrottleOutPacketType.Cloud:
return CloudOutgoingPacketQueue.Count;
case ThrottleOutPacketType.Task:
return TaskOutgoingPacketQueue.Count;
case ThrottleOutPacketType.Texture:
return TextureOutgoingPacketQueue.Count;
case ThrottleOutPacketType.Asset:
return AssetOutgoingPacketQueue.Count;
}
return 0;
}
}
}