* some follow up renaming of members et c.

Sugilite
lbsa71 2007-07-09 21:25:43 +00:00
parent 08a1fa3f96
commit 85dd493614
8 changed files with 21 additions and 17 deletions

View File

@ -8,11 +8,11 @@ namespace OpenSim.Framework
public delegate void ForEachClientDelegate( IClientAPI client );
public class ClientManager
{
private Dictionary<uint, IClientAPI> m_clientThreads;
private Dictionary<uint, IClientAPI> m_clients;
public void ForEachClient(ForEachClientDelegate whatToDo)
{
foreach (IClientAPI client in m_clientThreads.Values)
foreach (IClientAPI client in m_clients.Values)
{
whatToDo(client);
}
@ -20,12 +20,12 @@ namespace OpenSim.Framework
public ClientManager()
{
m_clientThreads = new Dictionary<uint, IClientAPI>();
m_clients = new Dictionary<uint, IClientAPI>();
}
public void Add(uint id, IClientAPI client )
{
m_clientThreads.Add( id, client );
m_clients.Add( id, client );
}
}
}

View File

@ -217,7 +217,7 @@ namespace OpenSim
m_udpServer.Add(udpServer);
this.regionData.Add(regionDat);
LocalWorld = new Scene(udpServer.PacketServer.ClientAPIs, regionDat, authenBase, commsManager, this.AssetCache, httpServer);
LocalWorld = new Scene(udpServer.PacketServer.ClientManager, regionDat, authenBase, commsManager, this.AssetCache, httpServer);
this.m_localWorld.Add(LocalWorld);
//LocalWorld.InventoryCache = InventoryCache;
//LocalWorld.AssetCache = AssetCache;

View File

@ -41,7 +41,11 @@ namespace OpenSim.Region.ClientStack
private ClientStackNetworkHandler _networkHandler;
private IWorld _localWorld;
public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
public ClientManager ClientAPIs = new ClientManager();
private ClientManager m_clientManager = new ClientManager();
public ClientManager ClientManager
{
get { return m_clientManager; }
}
public PacketServer(ClientStackNetworkHandler networkHandler)
{
@ -150,7 +154,7 @@ namespace OpenSim.Region.ClientStack
authenticateSessionsClass);
this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);
this.m_clientManager.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);
return true;
}

View File

@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Scenes
// Console.WriteLine("Chat message");
ScenePresence avatar = null;
m_clientThreads.ForEachClient(delegate(IClientAPI client)
m_clientManager.ForEachClient(delegate(IClientAPI client)
{
int dis = -1000;
if (this.Avatars.ContainsKey(client.AgentId))

View File

@ -98,13 +98,13 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="clientThreads">Dictionary to contain client threads</param>
/// <param name="regionHandle">Region Handle for this region</param>
/// <param name="regionName">Region Name for this region</param>
public Scene(ClientManager clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
public Scene(ClientManager clientManager, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
{
updateLock = new Mutex(false);
this.authenticateHandler = authen;
this.commsManager = commsMan;
this.assetCache = assetCach;
m_clientThreads = clientThreads;
m_clientManager = clientManager;
m_regInfo = regInfo;
m_regionHandle = m_regInfo.RegionHandle;
m_regionName = m_regInfo.RegionName;
@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Scenes
}
this.localStorage.SaveMap(this.Terrain.getHeights1D());
m_clientThreads.ForEachClient(delegate(IClientAPI client)
m_clientManager.ForEachClient(delegate(IClientAPI client)
{
this.SendLayerData(client);
});
@ -260,7 +260,7 @@ namespace OpenSim.Region.Environment.Scenes
}
this.localStorage.SaveMap(this.Terrain.getHeights1D());
m_clientThreads.ForEachClient(delegate(IClientAPI client)
m_clientManager.ForEachClient(delegate(IClientAPI client)
{
this.SendLayerData(client);
});
@ -290,7 +290,7 @@ namespace OpenSim.Region.Environment.Scenes
{
/* Dont save here, rely on tainting system instead */
m_clientThreads.ForEachClient(delegate(IClientAPI client)
m_clientManager.ForEachClient(delegate(IClientAPI client)
{
this.SendLayerData(pointx, pointy, client);
});

View File

@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes
public abstract class SceneBase : IWorld
{
public Dictionary<LLUUID, EntityBase> Entities;
protected ClientManager m_clientThreads;
protected ClientManager m_clientManager;
protected ulong m_regionHandle;
protected string m_regionName;
protected RegionInfo m_regInfo;

View File

@ -15,8 +15,8 @@ namespace SimpleApp
{
private List<ScenePresence> m_avatars;
public MyWorld(ClientManager clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
: base(clientThreads, regionInfo, authen, commsMan, assetCach, httpServer)
public MyWorld(ClientManager clientManager, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
: base(clientManager, regionInfo, authen, commsMan, assetCach, httpServer)
{
m_avatars = new List<Avatar>();
}

View File

@ -54,7 +54,7 @@ namespace SimpleApp
RegionInfo regionInfo = new RegionInfo( 1000, 1000, internalEndPoint, "127.0.0.1" );
BaseHttpServer httpServer = new BaseHttpServer( internalEndPoint.Port );
MyWorld world = new MyWorld(packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer);
MyWorld world = new MyWorld(packetServer.ClientManager, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer);
world.PhysScene = PhysicsScene.Null;
udpServer.LocalWorld = world;