* some follow up renaming of members et c.
parent
08a1fa3f96
commit
85dd493614
|
@ -8,11 +8,11 @@ namespace OpenSim.Framework
|
||||||
public delegate void ForEachClientDelegate( IClientAPI client );
|
public delegate void ForEachClientDelegate( IClientAPI client );
|
||||||
public class ClientManager
|
public class ClientManager
|
||||||
{
|
{
|
||||||
private Dictionary<uint, IClientAPI> m_clientThreads;
|
private Dictionary<uint, IClientAPI> m_clients;
|
||||||
|
|
||||||
public void ForEachClient(ForEachClientDelegate whatToDo)
|
public void ForEachClient(ForEachClientDelegate whatToDo)
|
||||||
{
|
{
|
||||||
foreach (IClientAPI client in m_clientThreads.Values)
|
foreach (IClientAPI client in m_clients.Values)
|
||||||
{
|
{
|
||||||
whatToDo(client);
|
whatToDo(client);
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,12 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public ClientManager()
|
public ClientManager()
|
||||||
{
|
{
|
||||||
m_clientThreads = new Dictionary<uint, IClientAPI>();
|
m_clients = new Dictionary<uint, IClientAPI>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add(uint id, IClientAPI client )
|
public void Add(uint id, IClientAPI client )
|
||||||
{
|
{
|
||||||
m_clientThreads.Add( id, client );
|
m_clients.Add( id, client );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ namespace OpenSim
|
||||||
m_udpServer.Add(udpServer);
|
m_udpServer.Add(udpServer);
|
||||||
this.regionData.Add(regionDat);
|
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);
|
this.m_localWorld.Add(LocalWorld);
|
||||||
//LocalWorld.InventoryCache = InventoryCache;
|
//LocalWorld.InventoryCache = InventoryCache;
|
||||||
//LocalWorld.AssetCache = AssetCache;
|
//LocalWorld.AssetCache = AssetCache;
|
||||||
|
|
|
@ -41,7 +41,11 @@ namespace OpenSim.Region.ClientStack
|
||||||
private ClientStackNetworkHandler _networkHandler;
|
private ClientStackNetworkHandler _networkHandler;
|
||||||
private IWorld _localWorld;
|
private IWorld _localWorld;
|
||||||
public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
|
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)
|
public PacketServer(ClientStackNetworkHandler networkHandler)
|
||||||
{
|
{
|
||||||
|
@ -150,7 +154,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
authenticateSessionsClass);
|
authenticateSessionsClass);
|
||||||
|
|
||||||
this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// Console.WriteLine("Chat message");
|
// Console.WriteLine("Chat message");
|
||||||
ScenePresence avatar = null;
|
ScenePresence avatar = null;
|
||||||
|
|
||||||
m_clientThreads.ForEachClient(delegate(IClientAPI client)
|
m_clientManager.ForEachClient(delegate(IClientAPI client)
|
||||||
{
|
{
|
||||||
int dis = -1000;
|
int dis = -1000;
|
||||||
if (this.Avatars.ContainsKey(client.AgentId))
|
if (this.Avatars.ContainsKey(client.AgentId))
|
||||||
|
|
|
@ -98,13 +98,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="clientThreads">Dictionary to contain client threads</param>
|
/// <param name="clientThreads">Dictionary to contain client threads</param>
|
||||||
/// <param name="regionHandle">Region Handle for this region</param>
|
/// <param name="regionHandle">Region Handle for this region</param>
|
||||||
/// <param name="regionName">Region Name 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);
|
updateLock = new Mutex(false);
|
||||||
this.authenticateHandler = authen;
|
this.authenticateHandler = authen;
|
||||||
this.commsManager = commsMan;
|
this.commsManager = commsMan;
|
||||||
this.assetCache = assetCach;
|
this.assetCache = assetCach;
|
||||||
m_clientThreads = clientThreads;
|
m_clientManager = clientManager;
|
||||||
m_regInfo = regInfo;
|
m_regInfo = regInfo;
|
||||||
m_regionHandle = m_regInfo.RegionHandle;
|
m_regionHandle = m_regInfo.RegionHandle;
|
||||||
m_regionName = m_regInfo.RegionName;
|
m_regionName = m_regInfo.RegionName;
|
||||||
|
@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
this.localStorage.SaveMap(this.Terrain.getHeights1D());
|
this.localStorage.SaveMap(this.Terrain.getHeights1D());
|
||||||
|
|
||||||
m_clientThreads.ForEachClient(delegate(IClientAPI client)
|
m_clientManager.ForEachClient(delegate(IClientAPI client)
|
||||||
{
|
{
|
||||||
this.SendLayerData(client);
|
this.SendLayerData(client);
|
||||||
});
|
});
|
||||||
|
@ -260,7 +260,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
this.localStorage.SaveMap(this.Terrain.getHeights1D());
|
this.localStorage.SaveMap(this.Terrain.getHeights1D());
|
||||||
|
|
||||||
m_clientThreads.ForEachClient(delegate(IClientAPI client)
|
m_clientManager.ForEachClient(delegate(IClientAPI client)
|
||||||
{
|
{
|
||||||
this.SendLayerData(client);
|
this.SendLayerData(client);
|
||||||
});
|
});
|
||||||
|
@ -290,7 +290,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
/* Dont save here, rely on tainting system instead */
|
/* 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);
|
this.SendLayerData(pointx, pointy, client);
|
||||||
});
|
});
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public abstract class SceneBase : IWorld
|
public abstract class SceneBase : IWorld
|
||||||
{
|
{
|
||||||
public Dictionary<LLUUID, EntityBase> Entities;
|
public Dictionary<LLUUID, EntityBase> Entities;
|
||||||
protected ClientManager m_clientThreads;
|
protected ClientManager m_clientManager;
|
||||||
protected ulong m_regionHandle;
|
protected ulong m_regionHandle;
|
||||||
protected string m_regionName;
|
protected string m_regionName;
|
||||||
protected RegionInfo m_regInfo;
|
protected RegionInfo m_regInfo;
|
||||||
|
|
|
@ -15,8 +15,8 @@ namespace SimpleApp
|
||||||
{
|
{
|
||||||
private List<ScenePresence> m_avatars;
|
private List<ScenePresence> m_avatars;
|
||||||
|
|
||||||
public MyWorld(ClientManager clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
|
public MyWorld(ClientManager clientManager, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
|
||||||
: base(clientThreads, regionInfo, authen, commsMan, assetCach, httpServer)
|
: base(clientManager, regionInfo, authen, commsMan, assetCach, httpServer)
|
||||||
{
|
{
|
||||||
m_avatars = new List<Avatar>();
|
m_avatars = new List<Avatar>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace SimpleApp
|
||||||
RegionInfo regionInfo = new RegionInfo( 1000, 1000, internalEndPoint, "127.0.0.1" );
|
RegionInfo regionInfo = new RegionInfo( 1000, 1000, internalEndPoint, "127.0.0.1" );
|
||||||
|
|
||||||
BaseHttpServer httpServer = new BaseHttpServer( internalEndPoint.Port );
|
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;
|
world.PhysScene = PhysicsScene.Null;
|
||||||
udpServer.LocalWorld = world;
|
udpServer.LocalWorld = world;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue