aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj1
-rw-r--r--Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs10
-rw-r--r--Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs77
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.cs5
-rw-r--r--OpenSim/OpenSim.RegionServer/PacketServer.cs6
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs2
6 files changed, 96 insertions, 5 deletions
diff --git a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj
index 80297f3..836ab7e 100644
--- a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj
+++ b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj
@@ -39,6 +39,7 @@
39 <ItemGroup> 39 <ItemGroup>
40 <Compile Include="RegionServerCommsManager.cs" /> 40 <Compile Include="RegionServerCommsManager.cs" />
41 <Compile Include="Properties\AssemblyInfo.cs" /> 41 <Compile Include="Properties\AssemblyInfo.cs" />
42 <Compile Include="TestLocalCommsManager.cs" />
42 </ItemGroup> 43 </ItemGroup>
43 <ItemGroup> 44 <ItemGroup>
44 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj"> 45 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
diff --git a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs
index 4f42f8b..9767185 100644
--- a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs
+++ b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs
@@ -1,4 +1,5 @@
1using System; 1using System;
2using System.Collections;
2using System.Collections.Generic; 3using System.Collections.Generic;
3using System.Text; 4using System.Text;
4using OpenSim.Framework; 5using OpenSim.Framework;
@@ -62,5 +63,14 @@ namespace OpenGrid.Framework.Communications
62 { 63 {
63 return false; 64 return false;
64 } 65 }
66
67 /// <summary>
68 ///
69 /// </summary>
70 /// <returns></returns>
71 public virtual IList RequestMapBlocks()
72 {
73 return null;
74 }
65 } 75 }
66} 76}
diff --git a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
new file mode 100644
index 0000000..32f4718
--- /dev/null
+++ b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
@@ -0,0 +1,77 @@
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Text;
5using libsecondlife;
6using OpenSim.Framework;
7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Types;
9
10namespace OpenGrid.Framework.Communications
11{
12 public class TestLocalCommsManager : RegionServerCommsManager
13 {
14 protected Dictionary<uint , RegionInfo> regions = new Dictionary<uint,RegionInfo>();
15
16 public TestLocalCommsManager()
17 {
18
19 }
20
21 /// <summary>
22 ///
23 /// </summary>
24 /// <returns></returns>
25 public override RegionInfo LoadRegionConfigFromGridServer(LLUUID regionID)
26 {
27 return null;
28 }
29
30 /// <summary>
31 ///
32 /// </summary>
33 /// <param name="regionInfo"></param>
34 /// <returns></returns>
35 public override IRegionCommsHost RegisterRegion(RegionInfo regionInfo)
36 {
37 return null;
38 }
39
40 /// <summary>
41 ///
42 /// </summary>
43 /// <param name="regionInfo"></param>
44 /// <returns></returns>
45 public override List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
46 {
47 return null;
48 }
49
50 /// <summary>
51 ///
52 /// </summary>
53 /// <returns></returns>
54 public override bool InformNeighbourOfChildAgent(uint regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
55 {
56 return false;
57 }
58
59 /// <summary>
60 ///
61 /// </summary>
62 /// <returns></returns>
63 public override bool AvatarCrossingToRegion()
64 {
65 return false;
66 }
67
68 /// <summary>
69 ///
70 /// </summary>
71 /// <returns></returns>
72 public override IList RequestMapBlocks()
73 {
74 return null;
75 }
76 }
77}
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs
index d7e681f..d970162 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.cs
@@ -78,10 +78,11 @@ namespace OpenSim
78 private int cachedtextureserial = 0; 78 private int cachedtextureserial = 0;
79 private RegionInfo m_regionData; 79 private RegionInfo m_regionData;
80 protected AuthenticateSessionsBase m_authenticateSessionsHandler; 80 protected AuthenticateSessionsBase m_authenticateSessionsHandler;
81 protected uint serverPort = 0;
81 82
82 83 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions, uint port)
83 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
84 { 84 {
85 this.serverPort = port;
85 m_world = world; 86 m_world = world;
86 m_clientThreads = clientThreads; 87 m_clientThreads = clientThreads;
87 m_assetCache = assetCache; 88 m_assetCache = assetCache;
diff --git a/OpenSim/OpenSim.RegionServer/PacketServer.cs b/OpenSim/OpenSim.RegionServer/PacketServer.cs
index 0ab4a8d..ab77b5d 100644
--- a/OpenSim/OpenSim.RegionServer/PacketServer.cs
+++ b/OpenSim/OpenSim.RegionServer/PacketServer.cs
@@ -16,10 +16,12 @@ namespace OpenSim
16 private IWorld _localWorld; 16 private IWorld _localWorld;
17 public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>(); 17 public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
18 public Dictionary<uint, IClientAPI> ClientAPIs = new Dictionary<uint, IClientAPI>(); 18 public Dictionary<uint, IClientAPI> ClientAPIs = new Dictionary<uint, IClientAPI>();
19 protected uint serverPort;
19 20
20 public PacketServer(OpenSimNetworkHandler networkHandler) 21 public PacketServer(OpenSimNetworkHandler networkHandler, uint port)
21 { 22 {
22 _networkHandler = networkHandler; 23 _networkHandler = networkHandler;
24 this.serverPort = port;
23 _networkHandler.RegisterPacketServer(this); 25 _networkHandler.RegisterPacketServer(this);
24 } 26 }
25 27
@@ -66,7 +68,7 @@ namespace OpenSim
66 68
67 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass) 69 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass)
68 { 70 {
69 ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass); 71 ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass, serverPort);
70 this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); 72 this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
71 this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser); 73 this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);
72 74
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
index 5d8c1d8..fce5555 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs
@@ -82,7 +82,7 @@ namespace OpenSim
82 82
83 protected virtual void CreatePacketServer() 83 protected virtual void CreatePacketServer()
84 { 84 {
85 PacketServer packetServer = new PacketServer(this); 85 PacketServer packetServer = new PacketServer(this, (uint) listenPort);
86 } 86 }
87 87
88 protected virtual void OnReceivedData(IAsyncResult result) 88 protected virtual void OnReceivedData(IAsyncResult result)