aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs29
1 files changed, 15 insertions, 14 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index 2c0d43b..fe8c11a 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -16,6 +16,7 @@ using OpenSim.Region.GridInterfaces.Local;
16using System.Timers; 16using System.Timers;
17using OpenSim.Region.Environment.Scenes; 17using OpenSim.Region.Environment.Scenes;
18using OpenSim.Framework.Data; 18using OpenSim.Framework.Data;
19using OpenSim.Region.Environment;
19 20
20namespace SimpleApp 21namespace SimpleApp
21{ 22{
@@ -34,42 +35,38 @@ namespace SimpleApp
34 35
35 protected override void Initialize() 36 protected override void Initialize()
36 { 37 {
38 m_httpServerPort = 9000;
37 } 39 }
38 40
39 public void Run() 41 public void Run()
40 { 42 {
41 base.StartUp(); 43 base.StartUp();
42 44
43 string ipaddr = "127.0.0.1";
44
45 MainLog.Instance = m_log;
46
47 m_circuitManager = new AuthenticateSessionsBase(); 45 m_circuitManager = new AuthenticateSessionsBase();
48 46
49 InventoryCache inventoryCache = new InventoryCache(); 47 InventoryCache inventoryCache = new InventoryCache();
50 48
51 LocalAssetServer assetServer = new LocalAssetServer(); 49 LocalAssetServer assetServer = new LocalAssetServer();
52 assetServer.SetServerInfo("http://" + ipaddr + ":8003/", ""); 50 assetServer.SetServerInfo("http://localhost:8003/", "");
53 51
54 AssetCache assetCache = new AssetCache(assetServer); 52 AssetCache assetCache = new AssetCache(assetServer);
55 53
56 ScenePresence.LoadTextureFile("avatar-texture.dat"); 54 ScenePresence.LoadTextureFile("avatar-texture.dat");
57 ScenePresence.PhysicsEngineFlying = true; 55 ScenePresence.PhysicsEngineFlying = true;
58 56
59 IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse(ipaddr), 9000); 57 IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000);
58 RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost");
60 59
61 UDPServer udpServer = new UDPServer(internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager); 60 UDPServer udpServer = new UDPServer(internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager);
62 PacketServer packetServer = new PacketServer(udpServer); 61 PacketServer packetServer = new PacketServer(udpServer);
63 62
64 BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port); 63 CommunicationsLocal communicationsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer);
65 64
66 CommunicationsLocal communicationsManager = new CommunicationsLocal(m_networkServersInfo, httpServer); 65 StorageManager storeMan = GetStoreManager(regionInfo);
67 66
68 RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, ipaddr);
69 67
70 OpenSim.Region.Environment.StorageManager storeMan = new OpenSim.Region.Environment.StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp");
71 68
72 m_world = new MyWorld( regionInfo, m_circuitManager, communicationsManager, assetCache, storeMan, httpServer); 69 m_world = new MyWorld( regionInfo, m_circuitManager, communicationsManager, assetCache, storeMan, m_httpServer);
73 m_world.PhysScene = GetPhysicsScene( ); 70 m_world.PhysScene = GetPhysicsScene( );
74 71
75 m_world.LoadWorldMap(); 72 m_world.LoadWorldMap();
@@ -78,7 +75,7 @@ namespace SimpleApp
78 75
79 udpServer.LocalWorld = m_world; 76 udpServer.LocalWorld = m_world;
80 77
81 httpServer.Start(); 78 m_httpServer.Start();
82 udpServer.ServerListener(); 79 udpServer.ServerListener();
83 80
84 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test"); 81 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test");
@@ -105,6 +102,11 @@ namespace SimpleApp
105 102
106 } 103 }
107 104
105 protected override StorageManager GetStoreManager(RegionInfo regionInfo)
106 {
107 return new StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp");
108 }
109
108 protected override PhysicsScene GetPhysicsScene( ) 110 protected override PhysicsScene GetPhysicsScene( )
109 { 111 {
110 return GetPhysicsScene("basicphysics"); 112 return GetPhysicsScene("basicphysics");
@@ -128,8 +130,7 @@ namespace SimpleApp
128 { 130 {
129 Program app = new Program(); 131 Program app = new Program();
130 132
131 //app.StartUp(); 133 app.StartUp();
132 app.Run();
133 } 134 }
134 } 135 }
135} 136}