MW 2007-05-31 13:45:18 +00:00
parent c194bfbada
commit ee5bd67b82
6 changed files with 96 additions and 5 deletions

View File

@ -39,6 +39,7 @@
<ItemGroup>
<Compile Include="RegionServerCommsManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestLocalCommsManager.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">

View File

@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework;
@ -62,5 +63,14 @@ namespace OpenGrid.Framework.Communications
{
return false;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public virtual IList RequestMapBlocks()
{
return null;
}
}
}

View File

@ -0,0 +1,77 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenSim.Framework;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
namespace OpenGrid.Framework.Communications
{
public class TestLocalCommsManager : RegionServerCommsManager
{
protected Dictionary<uint , RegionInfo> regions = new Dictionary<uint,RegionInfo>();
public TestLocalCommsManager()
{
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public override RegionInfo LoadRegionConfigFromGridServer(LLUUID regionID)
{
return null;
}
/// <summary>
///
/// </summary>
/// <param name="regionInfo"></param>
/// <returns></returns>
public override IRegionCommsHost RegisterRegion(RegionInfo regionInfo)
{
return null;
}
/// <summary>
///
/// </summary>
/// <param name="regionInfo"></param>
/// <returns></returns>
public override List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
{
return null;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public override bool InformNeighbourOfChildAgent(uint regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
{
return false;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public override bool AvatarCrossingToRegion()
{
return false;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public override IList RequestMapBlocks()
{
return null;
}
}
}

View File

@ -78,10 +78,11 @@ namespace OpenSim
private int cachedtextureserial = 0;
private RegionInfo m_regionData;
protected AuthenticateSessionsBase m_authenticateSessionsHandler;
protected uint serverPort = 0;
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions, uint port)
{
this.serverPort = port;
m_world = world;
m_clientThreads = clientThreads;
m_assetCache = assetCache;

View File

@ -16,10 +16,12 @@ namespace OpenSim
private IWorld _localWorld;
public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
public Dictionary<uint, IClientAPI> ClientAPIs = new Dictionary<uint, IClientAPI>();
protected uint serverPort;
public PacketServer(OpenSimNetworkHandler networkHandler)
public PacketServer(OpenSimNetworkHandler networkHandler, uint port)
{
_networkHandler = networkHandler;
this.serverPort = port;
_networkHandler.RegisterPacketServer(this);
}
@ -66,7 +68,7 @@ namespace OpenSim
public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass)
{
ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass);
ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass, serverPort);
this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);

View File

@ -82,7 +82,7 @@ namespace OpenSim
protected virtual void CreatePacketServer()
{
PacketServer packetServer = new PacketServer(this);
PacketServer packetServer = new PacketServer(this, (uint) listenPort);
}
protected virtual void OnReceivedData(IAsyncResult result)