Plumb conifg into the client views. Add config option to configure packet

dropping.
0.6.5-rc1
Melanie Thielker 2009-05-02 17:31:49 +00:00
parent 011448f69a
commit 66e25abbfe
6 changed files with 31 additions and 0 deletions

View File

@ -27,6 +27,7 @@
using OpenMetaverse;
using OpenSim.Framework.Console;
using Nini.Config;
namespace OpenSim.Framework
{
@ -62,6 +63,8 @@ namespace OpenSim.Framework
RegionStatus RegionStatus { get; set; }
ClientManager ClientManager { get; }
IConfigSource Config { get; }
float TimeDilation { get; }
event restart OnRestart;

View File

@ -44,6 +44,7 @@ using OpenSim.Framework.Statistics;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using Timer=System.Timers.Timer;
using Nini.Config;
namespace OpenSim.Region.ClientStack.LindenUDP
{
@ -517,6 +518,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_PacketHandler.SynchronizeClient = SynchronizeClient;
m_PacketHandler.OnPacketStats += PopulateStats;
if (scene.Config != null)
{
IConfig clientConfig = scene.Config.Configs["LLClient"];
if (clientConfig != null)
{
m_PacketHandler.ReliableIsImportant =
clientConfig.GetBoolean("ReliableIsImportant",
false);
}
}
RegisterLocalPacketHandlers();
m_imageManager = new LLImageManager(this, m_assetCache,Scene.RequestModuleInterface<IJ2KDecoder>());
}

View File

@ -135,6 +135,11 @@ namespace OpenSim.Region.Framework.Scenes
{
get { return m_capsModule; }
}
public IConfigSource Config
{
get { return m_config; }
}
// Central Update Loop

View File

@ -31,6 +31,7 @@ using System.Reflection;
using System.Threading;
using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Communications.Cache;
@ -50,6 +51,11 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields
public IConfigSource Config
{
get { return null; }
}
/// <value>
/// All the region modules attached to this scene.
/// </value>

View File

@ -1275,3 +1275,7 @@
; Enables the experimental packet pool. Yes, we've been here before.
;RecyclePackets = true;
;RecycleDataBlocks = true;
[LLClient]
; Resend packets markes as reliable until they are received
;ReliableIsImportant = false

View File

@ -1390,6 +1390,7 @@
<Reference name="Nini.dll" />
<Reference name="log4net.dll"/>
<Reference name="C5.dll" />
<Reference name="Nini.dll" />
<Files>
<Match pattern="*.cs" recurse="false"/>