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

View File

@ -44,6 +44,7 @@ using OpenSim.Framework.Statistics;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using Timer=System.Timers.Timer; using Timer=System.Timers.Timer;
using Nini.Config;
namespace OpenSim.Region.ClientStack.LindenUDP namespace OpenSim.Region.ClientStack.LindenUDP
{ {
@ -517,6 +518,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_PacketHandler.SynchronizeClient = SynchronizeClient; m_PacketHandler.SynchronizeClient = SynchronizeClient;
m_PacketHandler.OnPacketStats += PopulateStats; 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(); RegisterLocalPacketHandlers();
m_imageManager = new LLImageManager(this, m_assetCache,Scene.RequestModuleInterface<IJ2KDecoder>()); 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; } get { return m_capsModule; }
} }
public IConfigSource Config
{
get { return m_config; }
}
// Central Update Loop // Central Update Loop

View File

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

View File

@ -1275,3 +1275,7 @@
; Enables the experimental packet pool. Yes, we've been here before. ; Enables the experimental packet pool. Yes, we've been here before.
;RecyclePackets = true; ;RecyclePackets = true;
;RecycleDataBlocks = 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="Nini.dll" />
<Reference name="log4net.dll"/> <Reference name="log4net.dll"/>
<Reference name="C5.dll" /> <Reference name="C5.dll" />
<Reference name="Nini.dll" />
<Files> <Files>
<Match pattern="*.cs" recurse="false"/> <Match pattern="*.cs" recurse="false"/>