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> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
@ -6,8 +6,7 @@
<ProjectGuid>{683344D5-0000-0000-0000-000000000000}</ProjectGuid> <ProjectGuid>{683344D5-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon> <ApplicationIcon></ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName> <AssemblyKeyContainerName>
</AssemblyKeyContainerName> </AssemblyKeyContainerName>
<AssemblyName>OpenGrid.Framework.Communications</AssemblyName> <AssemblyName>OpenGrid.Framework.Communications</AssemblyName>
@ -16,11 +15,9 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema> <DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder> <AppDesignerFolder></AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenGrid.Framework.Communications</RootNamespace> <RootNamespace>OpenGrid.Framework.Communications</RootNamespace>
<StartupObject> <StartupObject></StartupObject>
</StartupObject>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
</PropertyGroup> </PropertyGroup>
@ -31,8 +28,7 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile> <DocumentationFile></DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize> <Optimize>False</Optimize>
@ -41,8 +37,7 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn> <NoWarn></NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -51,8 +46,7 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<DocumentationFile> <DocumentationFile></DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize> <Optimize>True</Optimize>
@ -61,15 +55,13 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn> <NoWarn></NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" > <Reference Include="System" >
<HintPath>System.dll</HintPath> <HintPath>System.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" > <Reference Include="System.Xml" >
<HintPath>System.Xml.dll</HintPath> <HintPath>System.Xml.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -97,6 +89,9 @@
<Compile Include="RegionServerCommsOGS.cs"> <Compile Include="RegionServerCommsOGS.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="SandBoxManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GridServer\GridCommsManagerBase.cs"> <Compile Include="GridServer\GridCommsManagerBase.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@ -106,10 +101,18 @@
<Compile Include="GridServer\GridCommsManagerOGS.cs"> <Compile Include="GridServer\GridCommsManagerOGS.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </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"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="SandBoxManager.cs" />
<Compile Include="UserServer\UserCommsManagerBase.cs"> <Compile Include="UserServer\UserCommsManagerBase.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>

View File

@ -18,6 +18,9 @@
<include name="GridServer/GridCommsManagerBase.cs" /> <include name="GridServer/GridCommsManagerBase.cs" />
<include name="GridServer/GridCommsManagerLocal.cs" /> <include name="GridServer/GridCommsManagerLocal.cs" />
<include name="GridServer/GridCommsManagerOGS.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="Properties/AssemblyInfo.cs" />
<include name="UserServer/UserCommsManagerBase.cs" /> <include name="UserServer/UserCommsManagerBase.cs" />
<include name="UserServer/UserCommsManagerLocal.cs" /> <include name="UserServer/UserCommsManagerLocal.cs" />

View File

@ -14,19 +14,11 @@ namespace OpenGrid.Framework.Communications
public SandBoxManager SandManager = new SandBoxManager(); public SandBoxManager SandManager = new SandBoxManager();
public RegionServerCommsLocal() public RegionServerCommsLocal()
{ {
userServer = new UserServer.UserCommsManagerLocal(); //Local User Server UserServer = new UserServer.UserCommsManagerLocal(); //Local User Server
gridServer = new GridServer.GridCommsManagerLocal(SandManager); //Locl Grid 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 class RegionServerCommsManager
{ {
public UserServer.UserCommsManagerBase userServer; public UserServer.UserCommsManagerBase UserServer;
public GridServer.GridCommsManagerBase gridServer; public GridServer.GridCommsManagerBase GridServer;
public InterSimsCommsBase InterSims;
public RegionServerCommsManager() 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() public RegionServerCommsOGS()
{ {
userServer = new UserServer.UserCommsManagerOGS(); //Remote User Server UserServer = new UserServer.UserCommsManagerOGS(); //Remote User Server
gridServer = new GridServer.GridCommsManagerOGS(); //Remote Grid 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> /// <summary>
/// Main Register a region method with the CommsManager. /// Register a region method with the SandBoxManager.
/// Should do anything that is needed and also call the RegisterRegion method in the gridserver class
/// to inform the grid server (in grid mode).
/// </summary> /// </summary>
/// <param name="regionInfo"></param> /// <param name="regionInfo"></param>
/// <returns></returns> /// <returns></returns>
@ -43,9 +41,6 @@ namespace OpenGrid.Framework.Communications
} }
/// <summary> /// <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> /// </summary>
/// <param name="regionInfo"></param> /// <param name="regionInfo"></param>
/// <returns></returns> /// <returns></returns>
@ -73,9 +68,6 @@ namespace OpenGrid.Framework.Communications
} }
/// <summary> /// <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> /// </summary>
/// <param name="regionHandle"></param> /// <param name="regionHandle"></param>
/// <param name="agentData"></param> /// <param name="agentData"></param>

View File

@ -544,7 +544,7 @@ namespace OpenSim.Region
protected void InformClientOfNeighbours(IClientAPI remoteClient) protected void InformClientOfNeighbours(IClientAPI remoteClient)
{ {
// Console.WriteLine("informing client of neighbouring regions"); // 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"); //Console.WriteLine("we have " + neighbours.Count + " neighbouring regions");
if (neighbours != null) if (neighbours != null)
@ -556,7 +556,7 @@ namespace OpenSim.Region
agent.BaseFolder = LLUUID.Zero; agent.BaseFolder = LLUUID.Zero;
agent.InventoryFolder = LLUUID.Zero; agent.InventoryFolder = LLUUID.Zero;
agent.startpos = new LLVector3(128, 128, 70); 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); remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].IPListenAddr), (ushort)neighbours[i].IPListenPort);
} }
} }
@ -617,7 +617,7 @@ namespace OpenSim.Region
/// </summary> /// </summary>
public void RegisterRegionWithComms() 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) if (this.regionCommsHost != null)
{ {
this.regionCommsHost.OnExpectUser += new ExpectUserDelegate(this.NewUserConnection); 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> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
@ -6,8 +6,7 @@
<ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid> <ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon> <ApplicationIcon></ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName> <AssemblyKeyContainerName>
</AssemblyKeyContainerName> </AssemblyKeyContainerName>
<AssemblyName>OpenSim.RegionServer</AssemblyName> <AssemblyName>OpenSim.RegionServer</AssemblyName>
@ -16,11 +15,9 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema> <DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder> <AppDesignerFolder></AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenSim.RegionServer</RootNamespace> <RootNamespace>OpenSim.RegionServer</RootNamespace>
<StartupObject> <StartupObject></StartupObject>
</StartupObject>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
</PropertyGroup> </PropertyGroup>
@ -31,8 +28,7 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile> <DocumentationFile></DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize> <Optimize>False</Optimize>
@ -41,8 +37,7 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn> <NoWarn></NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -51,8 +46,7 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<DocumentationFile> <DocumentationFile></DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize> <Optimize>True</Optimize>
@ -61,8 +55,7 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn> <NoWarn></NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" > <Reference Include="System" >