Added InterSimComms (Likely to be renamed) to the commsManager and moved the InformClientOfNeighbours method into that.

Sugilite
MW 2007-06-10 19:08:51 +00:00
parent 453fadd940
commit fd1a0a1374
11 changed files with 127 additions and 94 deletions

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Types;
using OpenSim.Framework;
namespace OpenGrid.Framework.Communications
{
public abstract class InterSimsCommsBase
{
/// <summary>
/// Informs a neighbouring sim to expect a child agent
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentData"></param>
/// <returns></returns>
public abstract bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
}
}

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Types;
using OpenSim.Framework;
namespace OpenGrid.Framework.Communications
{
public class InterSimsCommsLocal : InterSimsCommsBase
{
private SandBoxManager sandBoxManager;
public InterSimsCommsLocal(SandBoxManager sandManager)
{
sandBoxManager = sandManager;
}
/// <summary>
/// Informs a neighbouring sim to expect a child agent
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentData"></param>
/// <returns></returns>
public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
{
return sandBoxManager.InformNeighbourOfChildAgent(regionHandle, agentData);
}
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Types;
using OpenSim.Framework;
namespace OpenGrid.Framework.Communications
{
public class InterSimsCommsOGS : InterSimsCommsBase
{
public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
{
return false;
}
}
}

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,8 +6,7 @@
<ProjectGuid>{683344D5-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<ApplicationIcon></ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenGrid.Framework.Communications</AssemblyName>
@ -16,11 +15,9 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder>
</AppDesignerFolder>
<AppDesignerFolder></AppDesignerFolder>
<RootNamespace>OpenGrid.Framework.Communications</RootNamespace>
<StartupObject>
</StartupObject>
<StartupObject></StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -31,8 +28,7 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DocumentationFile></DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -41,8 +37,7 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn>
</NoWarn>
<NoWarn></NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -51,8 +46,7 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DocumentationFile></DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -61,20 +55,18 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn>
</NoWarn>
<NoWarn></NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Reference Include="System" >
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml">
<Reference Include="System.Xml" >
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll">
<Reference Include="libsecondlife.dll" >
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
@ -84,7 +76,7 @@
<Name>OpenSim.Framework</Name>
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -97,6 +89,9 @@
<Compile Include="RegionServerCommsOGS.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SandBoxManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GridServer\GridCommsManagerBase.cs">
<SubType>Code</SubType>
</Compile>
@ -106,10 +101,18 @@
<Compile Include="GridServer\GridCommsManagerOGS.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="InterSimComms\InterSimsCommsBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="InterSimComms\InterSimsCommsLocal.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="InterSimComms\InterSimsCommsOGS.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SandBoxManager.cs" />
<Compile Include="UserServer\UserCommsManagerBase.cs">
<SubType>Code</SubType>
</Compile>
@ -127,4 +130,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@ -18,6 +18,9 @@
<include name="GridServer/GridCommsManagerBase.cs" />
<include name="GridServer/GridCommsManagerLocal.cs" />
<include name="GridServer/GridCommsManagerOGS.cs" />
<include name="InterSimComms/InterSimsCommsBase.cs" />
<include name="InterSimComms/InterSimsCommsLocal.cs" />
<include name="InterSimComms/InterSimsCommsOGS.cs" />
<include name="Properties/AssemblyInfo.cs" />
<include name="UserServer/UserCommsManagerBase.cs" />
<include name="UserServer/UserCommsManagerLocal.cs" />

View File

@ -14,19 +14,11 @@ namespace OpenGrid.Framework.Communications
public SandBoxManager SandManager = new SandBoxManager();
public RegionServerCommsLocal()
{
userServer = new UserServer.UserCommsManagerLocal(); //Local User Server
gridServer = new GridServer.GridCommsManagerLocal(SandManager); //Locl Grid Server
UserServer = new UserServer.UserCommsManagerLocal(); //Local User Server
GridServer = new GridServer.GridCommsManagerLocal(SandManager); //Locl Grid Server
InterSims = new InterSimsCommsLocal(SandManager);
}
/// <summary>
/// informs a neighbouring sim to expect a child agent
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentData"></param>
/// <returns></returns>
public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
{
return SandManager.InformNeighbourOfChildAgent(regionHandle, agentData);
}
}
}

View File

@ -12,17 +12,13 @@ namespace OpenGrid.Framework.Communications
public class RegionServerCommsManager
{
public UserServer.UserCommsManagerBase userServer;
public GridServer.GridCommsManagerBase gridServer;
public UserServer.UserCommsManagerBase UserServer;
public GridServer.GridCommsManagerBase GridServer;
public InterSimsCommsBase InterSims;
public RegionServerCommsManager()
{
}
public virtual bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
{
return false;
}
}
}

View File

@ -10,20 +10,10 @@ namespace OpenGrid.Framework.Communications
{
public RegionServerCommsOGS()
{
userServer = new UserServer.UserCommsManagerOGS(); //Remote User Server
gridServer = new GridServer.GridCommsManagerOGS(); //Remote Grid Server
UserServer = new UserServer.UserCommsManagerOGS(); //Remote User Server
GridServer = new GridServer.GridCommsManagerOGS(); //Remote Grid Server
InterSims = new InterSimsCommsOGS();
}
/// <summary>
/// informs a neighbouring sim to expect a child agent
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentData"></param>
/// <returns></returns>
public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
{
return false;
}
}
}

View File

@ -19,9 +19,7 @@ namespace OpenGrid.Framework.Communications
}
/// <summary>
/// Main Register a region method with the CommsManager.
/// Should do anything that is needed and also call the RegisterRegion method in the gridserver class
/// to inform the grid server (in grid mode).
/// Register a region method with the SandBoxManager.
/// </summary>
/// <param name="regionInfo"></param>
/// <returns></returns>
@ -43,9 +41,6 @@ namespace OpenGrid.Framework.Communications
}
/// <summary>
/// In the current class structure this shouldn't be here as it should only be in the gridserver class
/// but having it there in sandbox mode makes things very difficult, so for now until something is sorted out
/// it will have to be here as well
/// </summary>
/// <param name="regionInfo"></param>
/// <returns></returns>
@ -73,9 +68,6 @@ namespace OpenGrid.Framework.Communications
}
/// <summary>
/// informs a neighbouring sim to expect a child agent
/// I guess if we are going to stick with the current class structure then we need a intersim class
/// but think we need to really rethink the class structure as currently it makes things very messy for sandbox mode
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentData"></param>

View File

@ -544,7 +544,7 @@ namespace OpenSim.Region
protected void InformClientOfNeighbours(IClientAPI remoteClient)
{
// Console.WriteLine("informing client of neighbouring regions");
List<RegionInfo> neighbours = this.commsManager.gridServer.RequestNeighbours(this.m_regInfo);
List<RegionInfo> neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo);
//Console.WriteLine("we have " + neighbours.Count + " neighbouring regions");
if (neighbours != null)
@ -556,7 +556,7 @@ namespace OpenSim.Region
agent.BaseFolder = LLUUID.Zero;
agent.InventoryFolder = LLUUID.Zero;
agent.startpos = new LLVector3(128, 128, 70);
this.commsManager.InformNeighbourOfChildAgent(neighbours[i].RegionHandle, agent);
this.commsManager.InterSims.InformNeighbourOfChildAgent(neighbours[i].RegionHandle, agent);
remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].IPListenAddr), (ushort)neighbours[i].IPListenPort);
}
}
@ -617,7 +617,7 @@ namespace OpenSim.Region
/// </summary>
public void RegisterRegionWithComms()
{
this.regionCommsHost = this.commsManager.gridServer.RegisterRegion(this.m_regInfo);
this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo);
if (this.regionCommsHost != null)
{
this.regionCommsHost.OnExpectUser += new ExpectUserDelegate(this.NewUserConnection);

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,8 +6,7 @@
<ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<ApplicationIcon></ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenSim.RegionServer</AssemblyName>
@ -16,11 +15,9 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder>
</AppDesignerFolder>
<AppDesignerFolder></AppDesignerFolder>
<RootNamespace>OpenSim.RegionServer</RootNamespace>
<StartupObject>
</StartupObject>
<StartupObject></StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -31,8 +28,7 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DocumentationFile></DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -41,8 +37,7 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn>
</NoWarn>
<NoWarn></NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -51,8 +46,7 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DocumentationFile></DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -61,27 +55,26 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn>
</NoWarn>
<NoWarn></NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Reference Include="System" >
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<Reference Include="System.Xml" >
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll">
<Reference Include="libsecondlife.dll" >
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Axiom.MathLib.dll">
<Reference Include="Axiom.MathLib.dll" >
<HintPath>..\..\bin\Axiom.MathLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Db4objects.Db4o.dll">
<Reference Include="Db4objects.Db4o.dll" >
<HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
<Private>False</Private>
</Reference>
@ -91,43 +84,43 @@
<Name>OpenSim.Terrain.BasicTerrain</Name>
<Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj">
<Name>OpenSim.Framework</Name>
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
<Name>OpenSim.Framework.Console</Name>
<Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj">
<Name>OpenSim.GenericConfig.Xml</Name>
<Project>{E88EF749-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj">
<Name>OpenSim.Physics.Manager</Name>
<Project>{8BE16150-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj">
<Name>OpenSim.Servers</Name>
<Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj">
<Name>XMLRPC</Name>
<Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -193,4 +186,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>