aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.World')
-rw-r--r--OpenSim/OpenSim.World/OpenSim.World.csproj4
-rw-r--r--OpenSim/OpenSim.World/World.cs29
2 files changed, 32 insertions, 1 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}