diff options
Some more code refactoring, plus a restructuring of the directories so that the Grid servers can be a separate solution to the region server.
Diffstat (limited to 'OpenSim-Source/OpenSim.RegionServer/RegionServerBase.cs')
-rw-r--r-- | OpenSim-Source/OpenSim.RegionServer/RegionServerBase.cs | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/OpenSim-Source/OpenSim.RegionServer/RegionServerBase.cs b/OpenSim-Source/OpenSim.RegionServer/RegionServerBase.cs new file mode 100644 index 0000000..69a8748 --- /dev/null +++ b/OpenSim-Source/OpenSim.RegionServer/RegionServerBase.cs | |||
@@ -0,0 +1,103 @@ | |||
1 | using System; | ||
2 | using System.Text; | ||
3 | using System.IO; | ||
4 | using System.Threading; | ||
5 | using System.Net; | ||
6 | using System.Net.Sockets; | ||
7 | using System.Timers; | ||
8 | using System.Reflection; | ||
9 | using System.Collections; | ||
10 | using System.Collections.Generic; | ||
11 | using libsecondlife; | ||
12 | using libsecondlife.Packets; | ||
13 | using OpenSim.world; | ||
14 | using OpenSim.Terrain; | ||
15 | using OpenSim.Framework.Interfaces; | ||
16 | using OpenSim.Framework.Types; | ||
17 | using OpenSim.UserServer; | ||
18 | using OpenSim.Assets; | ||
19 | using OpenSim.CAPS; | ||
20 | using OpenSim.Framework.Console; | ||
21 | using OpenSim.Physics.Manager; | ||
22 | using Nwc.XmlRpc; | ||
23 | using OpenSim.Servers; | ||
24 | using OpenSim.GenericConfig; | ||
25 | |||
26 | namespace OpenSim | ||
27 | { | ||
28 | public class RegionServerBase | ||
29 | { | ||
30 | protected IGenericConfig localConfig; | ||
31 | protected PhysicsManager physManager; | ||
32 | protected Grid GridServers; | ||
33 | protected AssetCache AssetCache; | ||
34 | protected InventoryCache InventoryCache; | ||
35 | protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); | ||
36 | protected DateTime startuptime; | ||
37 | protected RegionInfo regionData; | ||
38 | |||
39 | protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); | ||
40 | public string m_physicsEngine; | ||
41 | public bool m_sandbox = false; | ||
42 | public bool m_loginserver; | ||
43 | public bool user_accounts = false; | ||
44 | public bool gridLocalAsset = false; | ||
45 | protected bool configFileSetup = false; | ||
46 | public string m_config; | ||
47 | |||
48 | protected UDPServer m_udpServer; | ||
49 | protected BaseHttpServer httpServer; | ||
50 | protected AuthenticateSessionsBase AuthenticateSessionsHandler; | ||
51 | |||
52 | protected ConsoleBase m_console; | ||
53 | |||
54 | public RegionServerBase() | ||
55 | { | ||
56 | |||
57 | } | ||
58 | |||
59 | public RegionServerBase(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) | ||
60 | { | ||
61 | this.configFileSetup = useConfigFile; | ||
62 | m_sandbox = sandBoxMode; | ||
63 | m_loginserver = startLoginServer; | ||
64 | m_physicsEngine = physicsEngine; | ||
65 | m_config = configFile; | ||
66 | } | ||
67 | |||
68 | protected World m_localWorld; | ||
69 | public World LocalWorld | ||
70 | { | ||
71 | get { return m_localWorld; } | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// Performs initialisation of the world, such as loading configuration from disk. | ||
76 | /// </summary> | ||
77 | public virtual void StartUp() | ||
78 | { | ||
79 | } | ||
80 | |||
81 | protected virtual void SetupLocalGridServers() | ||
82 | { | ||
83 | } | ||
84 | |||
85 | protected virtual void SetupRemoteGridServers() | ||
86 | { | ||
87 | |||
88 | } | ||
89 | |||
90 | protected virtual void SetupLocalWorld() | ||
91 | { | ||
92 | } | ||
93 | |||
94 | protected virtual void SetupHttpListener() | ||
95 | { | ||
96 | } | ||
97 | |||
98 | protected virtual void ConnectToRemoteGridServer() | ||
99 | { | ||
100 | |||
101 | } | ||
102 | } | ||
103 | } | ||