diff options
author | MW | 2007-05-27 18:52:42 +0000 |
---|---|---|
committer | MW | 2007-05-27 18:52:42 +0000 |
commit | c746a2f9f4f0b1e7eea564effdae63472f79ab22 (patch) | |
tree | 54d23af3d168958bfec995cf2987cf5af79ac149 /OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs | |
parent | Goodbye World (diff) | |
download | opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.zip opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.gz opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.bz2 opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.xz |
Should allow multiple worlds (and UDP servers) to be ran in one instance, just missing backend comms and working Avatar/primitives classes.
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs b/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs new file mode 100644 index 0000000..a607909 --- /dev/null +++ b/OpenSim/OpenSim.RegionServer/NetworkServersInfo.cs | |||
@@ -0,0 +1,91 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Framework.Interfaces; | ||
5 | |||
6 | namespace OpenSim | ||
7 | { | ||
8 | public class NetworkServersInfo | ||
9 | { | ||
10 | public string AssetURL = "http://127.0.0.1:8003/"; | ||
11 | public string AssetSendKey = ""; | ||
12 | |||
13 | public string GridURL = ""; | ||
14 | public string GridSendKey = ""; | ||
15 | public string GridRecvKey = ""; | ||
16 | public string UserURL = ""; | ||
17 | public string UserSendKey = ""; | ||
18 | public string UserRecvKey = ""; | ||
19 | public bool isSandbox; | ||
20 | |||
21 | public void InitConfig(bool sandboxMode, IGenericConfig configData) | ||
22 | { | ||
23 | this.isSandbox = sandboxMode; | ||
24 | |||
25 | try | ||
26 | { | ||
27 | if (!isSandbox) | ||
28 | { | ||
29 | string attri = ""; | ||
30 | //Grid Server URL | ||
31 | attri = ""; | ||
32 | attri = configData.GetAttribute("GridServerURL"); | ||
33 | if (attri == "") | ||
34 | { | ||
35 | this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); | ||
36 | configData.SetAttribute("GridServerURL", this.GridURL); | ||
37 | } | ||
38 | else | ||
39 | { | ||
40 | this.GridURL = attri; | ||
41 | } | ||
42 | |||
43 | //Grid Send Key | ||
44 | attri = ""; | ||
45 | attri = configData.GetAttribute("GridSendKey"); | ||
46 | if (attri == "") | ||
47 | { | ||
48 | this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server", "null"); | ||
49 | configData.SetAttribute("GridSendKey", this.GridSendKey); | ||
50 | } | ||
51 | else | ||
52 | { | ||
53 | this.GridSendKey = attri; | ||
54 | } | ||
55 | |||
56 | //Grid Receive Key | ||
57 | attri = ""; | ||
58 | attri = configData.GetAttribute("GridRecvKey"); | ||
59 | if (attri == "") | ||
60 | { | ||
61 | this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server", "null"); | ||
62 | configData.SetAttribute("GridRecvKey", this.GridRecvKey); | ||
63 | } | ||
64 | else | ||
65 | { | ||
66 | this.GridRecvKey = attri; | ||
67 | } | ||
68 | |||
69 | attri = ""; | ||
70 | attri = configData.GetAttribute("AssetServerURL"); | ||
71 | if (attri == "") | ||
72 | { | ||
73 | this.AssetURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); | ||
74 | configData.SetAttribute("AssetServerURL", this.GridURL); | ||
75 | } | ||
76 | else | ||
77 | { | ||
78 | this.AssetURL = attri; | ||
79 | } | ||
80 | |||
81 | } | ||
82 | configData.Commit(); | ||
83 | } | ||
84 | catch (Exception e) | ||
85 | { | ||
86 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Config.cs:InitConfig() - Exception occured"); | ||
87 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString()); | ||
88 | } | ||
89 | } | ||
90 | } | ||
91 | } | ||