From ee5bd67b82f2fae77477b22765ba830e29ce4fd3 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 31 May 2007 13:45:18 +0000 Subject: [PATCH] --- .../OpenGrid.Framework.Communications.csproj | 1 + .../RegionServerCommsManager.cs | 10 +++ .../TestLocalCommsManager.cs | 77 +++++++++++++++++++ OpenSim/OpenSim.RegionServer/ClientView.cs | 5 +- OpenSim/OpenSim.RegionServer/PacketServer.cs | 6 +- OpenSim/OpenSim.RegionServer/UDPServer.cs | 2 +- 6 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs diff --git a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj index 80297f3448..836ab7e053 100644 --- a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj +++ b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj @@ -39,6 +39,7 @@ + diff --git a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs index 4f42f8bbcc..9767185f12 100644 --- a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs +++ b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs @@ -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; } + + /// + /// + /// + /// + public virtual IList RequestMapBlocks() + { + return null; + } } } diff --git a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs new file mode 100644 index 0000000000..32f4718945 --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs @@ -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 regions = new Dictionary(); + + public TestLocalCommsManager() + { + + } + + /// + /// + /// + /// + public override RegionInfo LoadRegionConfigFromGridServer(LLUUID regionID) + { + return null; + } + + /// + /// + /// + /// + /// + public override IRegionCommsHost RegisterRegion(RegionInfo regionInfo) + { + return null; + } + + /// + /// + /// + /// + /// + public override List RequestNeighbours(RegionInfo regionInfo) + { + return null; + } + + /// + /// + /// + /// + public override bool InformNeighbourOfChildAgent(uint regionHandle, AgentCircuitData agentData) //should change from agentCircuitData + { + return false; + } + + /// + /// + /// + /// + public override bool AvatarCrossingToRegion() + { + return false; + } + + /// + /// + /// + /// + public override IList RequestMapBlocks() + { + return null; + } + } +} diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs index d7e681f7bd..d970162df3 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.cs @@ -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 clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions) + public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary 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; diff --git a/OpenSim/OpenSim.RegionServer/PacketServer.cs b/OpenSim/OpenSim.RegionServer/PacketServer.cs index 0ab4a8d857..ab77b5d14c 100644 --- a/OpenSim/OpenSim.RegionServer/PacketServer.cs +++ b/OpenSim/OpenSim.RegionServer/PacketServer.cs @@ -16,10 +16,12 @@ namespace OpenSim private IWorld _localWorld; public Dictionary ClientThreads = new Dictionary(); public Dictionary ClientAPIs = new Dictionary(); + 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); diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs index 5d8c1d8751..fce5555e56 100644 --- a/OpenSim/OpenSim.RegionServer/UDPServer.cs +++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs @@ -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)