aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.World/OpenSim.World.csproj4
-rw-r--r--OpenSim/OpenSim.World/World.cs29
-rw-r--r--OpenSim/OpenSim/OpenSim.csproj4
-rw-r--r--OpenSim/OpenSim/OpenSimMain.cs10
4 files changed, 43 insertions, 4 deletions
diff --git a/OpenSim/OpenSim.World/OpenSim.World.csproj b/OpenSim/OpenSim.World/OpenSim.World.csproj
index 37293e1..78025d3 100644
--- a/OpenSim/OpenSim.World/OpenSim.World.csproj
+++ b/OpenSim/OpenSim.World/OpenSim.World.csproj
@@ -87,6 +87,10 @@
87 </Reference> 87 </Reference>
88 </ItemGroup> 88 </ItemGroup>
89 <ItemGroup> 89 <ItemGroup>
90 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
91 <Project>{C9702041-922C-452A-A1B4-7880AF53149A}</Project>
92 <Name>OpenGrid.Framework.Communications</Name>
93 </ProjectReference>
90 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj"> 94 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
91 <Name>OpenSim.Terrain.BasicTerrain</Name> 95 <Name>OpenSim.Terrain.BasicTerrain</Name>
92 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> 96 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs
index c731dbc..69d4646 100644
--- a/OpenSim/OpenSim.World/World.cs
+++ b/OpenSim/OpenSim.World/World.cs
@@ -14,6 +14,7 @@ using OpenSim.Framework.Inventory;
14using OpenSim.Framework; 14using OpenSim.Framework;
15using OpenSim.RegionServer.world.scripting; 15using OpenSim.RegionServer.world.scripting;
16using OpenSim.Terrain; 16using OpenSim.Terrain;
17using OpenGrid.Framework.Communications;
17 18
18namespace OpenSim.world 19namespace OpenSim.world
19{ 20{
@@ -36,6 +37,8 @@ namespace OpenSim.world
36 private Mutex updateLock; 37 private Mutex updateLock;
37 public string m_datastore; 38 public string m_datastore;
38 protected AuthenticateSessionsBase authenticateHandler; 39 protected AuthenticateSessionsBase authenticateHandler;
40 protected RegionCommsHostBase regionCommsHost;
41 protected RegionServerCommsManager commsManager;
39 42
40 #region Properties 43 #region Properties
41 /// <summary> 44 /// <summary>
@@ -61,17 +64,19 @@ namespace OpenSim.world
61 /// <param name="clientThreads">Dictionary to contain client threads</param> 64 /// <param name="clientThreads">Dictionary to contain client threads</param>
62 /// <param name="regionHandle">Region Handle for this region</param> 65 /// <param name="regionHandle">Region Handle for this region</param>
63 /// <param name="regionName">Region Name for this region</param> 66 /// <param name="regionName">Region Name for this region</param>
64 public World(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen) 67 public World(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen, RegionServerCommsManager commsMan)
65 { 68 {
66 try 69 try
67 { 70 {
68 updateLock = new Mutex(false); 71 updateLock = new Mutex(false);
69 this.authenticateHandler = authen; 72 this.authenticateHandler = authen;
73 this.commsManager = commsMan;
70 m_clientThreads = clientThreads; 74 m_clientThreads = clientThreads;
71 m_regInfo = regInfo; 75 m_regInfo = regInfo;
72 m_regionHandle = m_regInfo.RegionHandle; 76 m_regionHandle = m_regInfo.RegionHandle;
73 m_regionName = m_regInfo.RegionName; 77 m_regionName = m_regInfo.RegionName;
74 this.m_datastore = m_regInfo.DataStore; 78 this.m_datastore = m_regInfo.DataStore;
79 this.RegisterRegionWithComms();
75 80
76 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); 81 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
77 m_scripts = new Dictionary<string, ScriptFactory>(); 82 m_scripts = new Dictionary<string, ScriptFactory>();
@@ -540,5 +545,27 @@ namespace OpenSim.world
540 } 545 }
541 #endregion 546 #endregion
542 547
548 #region RegionCommsHost
549
550 public void RegisterRegionWithComms()
551 {
552 this.regionCommsHost = this.commsManager.RegisterRegion(this.m_regInfo);
553 if (this.regionCommsHost != null)
554 {
555 this.regionCommsHost.OnExpectUser += new ExpectUserDelegate(this.NewUserConnection);
556 }
557 }
558
559 public void NewUserConnection(ulong regionHandle,AgentCircuitData agent)
560 {
561 Console.WriteLine("World.cs - add new user connection");
562 //should just check that its meant for this region
563 if (regionHandle == this.m_regInfo.RegionHandle)
564 {
565 this.authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
566 }
567 }
568
569 #endregion
543 } 570 }
544} 571}
diff --git a/OpenSim/OpenSim/OpenSim.csproj b/OpenSim/OpenSim/OpenSim.csproj
index 79abd9e..03ae6ab 100644
--- a/OpenSim/OpenSim/OpenSim.csproj
+++ b/OpenSim/OpenSim/OpenSim.csproj
@@ -87,6 +87,10 @@
87 </Reference> 87 </Reference>
88 </ItemGroup> 88 </ItemGroup>
89 <ItemGroup> 89 <ItemGroup>
90 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
91 <Project>{C9702041-922C-452A-A1B4-7880AF53149A}</Project>
92 <Name>OpenGrid.Framework.Communications</Name>
93 </ProjectReference>
90 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj"> 94 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
91 <Name>OpenSim.Terrain.BasicTerrain</Name> 95 <Name>OpenSim.Terrain.BasicTerrain</Name>
92 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> 96 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs
index 4aa48bd..66aadb0 100644
--- a/OpenSim/OpenSim/OpenSimMain.cs
+++ b/OpenSim/OpenSim/OpenSimMain.cs
@@ -51,6 +51,7 @@ using OpenSim.Physics.Manager;
51using Nwc.XmlRpc; 51using Nwc.XmlRpc;
52using OpenSim.Servers; 52using OpenSim.Servers;
53using OpenSim.GenericConfig; 53using OpenSim.GenericConfig;
54using OpenGrid.Framework.Communications;
54 55
55namespace OpenSim 56namespace OpenSim
56{ 57{
@@ -58,6 +59,7 @@ namespace OpenSim
58 public class OpenSimMain : RegionServerBase, conscmd_callback 59 public class OpenSimMain : RegionServerBase, conscmd_callback
59 { 60 {
60 private CheckSumServer checkServer; 61 private CheckSumServer checkServer;
62 protected RegionServerCommsManager commsManager;
61 63
62 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) 64 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
63 { 65 {
@@ -101,10 +103,12 @@ namespace OpenSim
101 this.SetupLocalGridServers(); 103 this.SetupLocalGridServers();
102 this.checkServer = new CheckSumServer(12036); 104 this.checkServer = new CheckSumServer(12036);
103 this.checkServer.ServerListener(); 105 this.checkServer.ServerListener();
106 this.commsManager = new TestLocalCommsManager();
104 } 107 }
105 else 108 else
106 { 109 {
107 this.SetupRemoteGridServers(); 110 this.SetupRemoteGridServers();
111 this.commsManager = new TestLocalCommsManager(); //should be a remote comms manager class
108 } 112 }
109 113
110 startuptime = DateTime.Now; 114 startuptime = DateTime.Now;
@@ -126,8 +130,8 @@ namespace OpenSim
126 { 130 {
127 loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, false); 131 loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, false);
128 loginServer.Startup(); 132 loginServer.Startup();
129 loginServer.SetSessionHandler(((AuthenticateSessionsLocal)this.AuthenticateSessionsHandler[0]).AddNewSession); 133 //loginServer.SetSessionHandler(((AuthenticateSessionsLocal)this.AuthenticateSessionsHandler[0]).AddNewSession);
130 134 loginServer.SetSessionHandler(((TestLocalCommsManager)this.commsManager).AddNewSession);
131 //sandbox mode with loginserver not using accounts 135 //sandbox mode with loginserver not using accounts
132 httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod); 136 httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
133 } 137 }
@@ -234,7 +238,7 @@ namespace OpenSim
234 m_console.componentname = "Region " + regionData.RegionName; 238 m_console.componentname = "Region " + regionData.RegionName;
235 */ 239 */
236 240
237 LocalWorld = new World(udpServer.PacketServer.ClientAPIs, regionDat, authenBase); 241 LocalWorld = new World(udpServer.PacketServer.ClientAPIs, regionDat, authenBase, commsManager);
238 this.m_localWorld.Add(LocalWorld); 242 this.m_localWorld.Add(LocalWorld);
239 //LocalWorld.InventoryCache = InventoryCache; 243 //LocalWorld.InventoryCache = InventoryCache;
240 //LocalWorld.AssetCache = AssetCache; 244 //LocalWorld.AssetCache = AssetCache;