diff options
author | Adam Frisby | 2007-06-24 17:01:08 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-24 17:01:08 +0000 |
commit | 980a8cc629fe1228d450fa705fec3bacc3a84d98 (patch) | |
tree | 846a3fa7af7994a4c4948c46e28a3a5014f89251 /Common | |
parent | A bit more work on the AssetCache. (diff) | |
download | opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.zip opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.tar.gz opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.tar.bz2 opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.tar.xz |
Refactoring:
* Renamed IPListenAddr to CommsIPListenAddr
* Renamed IPListenPort to CommsIPListenPort
New Features:
* Begun OGS/.1 implementation -- created new temporary "GridInfo" class to hold grid settings, needs reworking to wherever settings are stored these days.
Diffstat (limited to '')
-rw-r--r-- | Common/OpenGrid.Framework.Communications/IGridServices.cs | 9 | ||||
-rw-r--r-- | Common/OpenSim.Framework/Types/RegionInfo.cs | 44 |
2 files changed, 42 insertions, 11 deletions
diff --git a/Common/OpenGrid.Framework.Communications/IGridServices.cs b/Common/OpenGrid.Framework.Communications/IGridServices.cs index b4bc3b6..469cf80 100644 --- a/Common/OpenGrid.Framework.Communications/IGridServices.cs +++ b/Common/OpenGrid.Framework.Communications/IGridServices.cs | |||
@@ -34,9 +34,16 @@ using OpenSim.Framework; | |||
34 | 34 | ||
35 | namespace OpenGrid.Framework.Communications | 35 | namespace OpenGrid.Framework.Communications |
36 | { | 36 | { |
37 | public class GridInfo | ||
38 | { | ||
39 | public string GridServerURI = "http://grid:8001/"; | ||
40 | public string GridServerSendKey = "badger"; | ||
41 | public string GridServerRecvKey = "badger"; | ||
42 | } | ||
43 | |||
37 | public interface IGridServices | 44 | public interface IGridServices |
38 | { | 45 | { |
39 | RegionCommsListener RegisterRegion(RegionInfo regionInfo); | 46 | RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo); |
40 | List<RegionInfo> RequestNeighbours(RegionInfo regionInfo); | 47 | List<RegionInfo> RequestNeighbours(RegionInfo regionInfo); |
41 | RegionInfo RequestNeighbourInfo(ulong regionHandle); | 48 | RegionInfo RequestNeighbourInfo(ulong regionHandle); |
42 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); | 49 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); |
diff --git a/Common/OpenSim.Framework/Types/RegionInfo.cs b/Common/OpenSim.Framework/Types/RegionInfo.cs index 651cd5b..3776c03 100644 --- a/Common/OpenSim.Framework/Types/RegionInfo.cs +++ b/Common/OpenSim.Framework/Types/RegionInfo.cs | |||
@@ -52,8 +52,19 @@ namespace OpenSim.Framework.Types | |||
52 | public string MasterAvatarLastName = ""; | 52 | public string MasterAvatarLastName = ""; |
53 | public string MasterAvatarSandboxPassword = ""; | 53 | public string MasterAvatarSandboxPassword = ""; |
54 | 54 | ||
55 | public int IPListenPort = 0; | 55 | /// <summary> |
56 | public string IPListenAddr = ""; | 56 | /// Port used for listening (TCP and UDP) |
57 | /// </summary> | ||
58 | /// <remarks>Seperate TCP and UDP</remarks> | ||
59 | public int CommsIPListenPort = 0; | ||
60 | /// <summary> | ||
61 | /// Address used for internal listening (default: 0.0.0.0?) | ||
62 | /// </summary> | ||
63 | public string CommsIPListenAddr = ""; | ||
64 | /// <summary> | ||
65 | /// Address used for external addressing (DNS or IP) | ||
66 | /// </summary> | ||
67 | public string CommsExternalAddress = ""; | ||
57 | 68 | ||
58 | 69 | ||
59 | public EstateSettings estateSettings; | 70 | public EstateSettings estateSettings; |
@@ -142,11 +153,11 @@ namespace OpenSim.Framework.Types | |||
142 | { | 153 | { |
143 | string port = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("UDP port for client connections", "9000"); | 154 | string port = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("UDP port for client connections", "9000"); |
144 | configData.SetAttribute("SimListenPort", port); | 155 | configData.SetAttribute("SimListenPort", port); |
145 | this.IPListenPort = Convert.ToInt32(port); | 156 | this.CommsIPListenPort = Convert.ToInt32(port); |
146 | } | 157 | } |
147 | else | 158 | else |
148 | { | 159 | { |
149 | this.IPListenPort = Convert.ToInt32(attri); | 160 | this.CommsIPListenPort = Convert.ToInt32(attri); |
150 | } | 161 | } |
151 | 162 | ||
152 | //Sim Listen Address | 163 | //Sim Listen Address |
@@ -154,8 +165,8 @@ namespace OpenSim.Framework.Types | |||
154 | attri = configData.GetAttribute("SimListenAddress"); | 165 | attri = configData.GetAttribute("SimListenAddress"); |
155 | if (attri == "") | 166 | if (attri == "") |
156 | { | 167 | { |
157 | this.IPListenAddr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1"); | 168 | this.CommsIPListenAddr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP Address to listen on for client connections", "0.0.0.0"); |
158 | configData.SetAttribute("SimListenAddress", this.IPListenAddr); | 169 | configData.SetAttribute("SimListenAddress", this.CommsIPListenAddr); |
159 | } | 170 | } |
160 | else | 171 | else |
161 | { | 172 | { |
@@ -166,20 +177,33 @@ namespace OpenSim.Framework.Types | |||
166 | System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname); | 177 | System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname); |
167 | try | 178 | try |
168 | { | 179 | { |
169 | this.IPListenAddr = ips[0].ToString(); | 180 | this.CommsIPListenAddr = ips[0].ToString(); |
170 | } | 181 | } |
171 | catch (Exception e) | 182 | catch (Exception e) |
172 | { | 183 | { |
173 | e.ToString(); | 184 | e.ToString(); |
174 | this.IPListenAddr = "127.0.0.1"; // Use the default if we fail | 185 | this.CommsIPListenAddr = "0.0.0.0"; // Use the default if we fail |
175 | } | 186 | } |
176 | } | 187 | } |
177 | else | 188 | else |
178 | { | 189 | { |
179 | this.IPListenAddr = attri; | 190 | this.CommsIPListenAddr = attri; |
180 | } | 191 | } |
181 | } | 192 | } |
182 | 193 | ||
194 | // Sim External Address | ||
195 | attri = ""; | ||
196 | attri = configData.GetAttribute("SimExternalAddress"); | ||
197 | if (attri == "") | ||
198 | { | ||
199 | this.CommsExternalAddress = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP or DNS address to send external clients to", "localhost"); | ||
200 | configData.SetAttribute("SimExternalAddress", this.CommsExternalAddress); | ||
201 | } | ||
202 | else | ||
203 | { | ||
204 | this.CommsExternalAddress = attri; | ||
205 | } | ||
206 | |||
183 | attri = ""; | 207 | attri = ""; |
184 | attri = configData.GetAttribute("TerrainFile"); | 208 | attri = configData.GetAttribute("TerrainFile"); |
185 | if (attri == "") | 209 | if (attri == "") |
@@ -263,7 +287,7 @@ namespace OpenSim.Framework.Types | |||
263 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Name: " + this.RegionName); | 287 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Name: " + this.RegionName); |
264 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); | 288 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); |
265 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Handle: " + this.RegionHandle.ToString()); | 289 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Handle: " + this.RegionHandle.ToString()); |
266 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort); | 290 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Listening on IP: " + this.CommsIPListenAddr + ":" + this.CommsIPListenPort); |
267 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Sandbox Mode? " + isSandbox.ToString()); | 291 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Sandbox Mode? " + isSandbox.ToString()); |
268 | 292 | ||
269 | } | 293 | } |