aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorAdam Frisby2008-05-02 18:18:43 +0000
committerAdam Frisby2008-05-02 18:18:43 +0000
commit4dc75e4b76e802d06faef5aa14beeced62eadcb5 (patch)
treebb2cce5efd3bc8dd5dc04e6ff6a6519e7a9e5a23 /OpenSim/Region/ClientStack
parent* Commit 3/3 - Please test this revision. (diff)
downloadopensim-SC_OLD-4dc75e4b76e802d06faef5aa14beeced62eadcb5.zip
opensim-SC_OLD-4dc75e4b76e802d06faef5aa14beeced62eadcb5.tar.gz
opensim-SC_OLD-4dc75e4b76e802d06faef5aa14beeced62eadcb5.tar.bz2
opensim-SC_OLD-4dc75e4b76e802d06faef5aa14beeced62eadcb5.tar.xz
* More clientstack abstractions - We now only have a single constructor call to UDPServer. Going to reduce this with an abstracted constructor in a bit.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/IClientNetworkServer.cs5
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs22
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs8
3 files changed, 25 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/IClientNetworkServer.cs b/OpenSim/Region/ClientStack/IClientNetworkServer.cs
index f15404c..4f6f638 100644
--- a/OpenSim/Region/ClientStack/IClientNetworkServer.cs
+++ b/OpenSim/Region/ClientStack/IClientNetworkServer.cs
@@ -1,5 +1,6 @@
1using System.Net.Sockets; 1using System.Net.Sockets;
2using OpenSim.Framework; 2using OpenSim.Framework;
3using OpenSim.Region.Environment.Scenes;
3 4
4namespace OpenSim.Region.ClientStack 5namespace OpenSim.Region.ClientStack
5{ 6{
@@ -7,5 +8,9 @@ namespace OpenSim.Region.ClientStack
7 { 8 {
8 Socket Server { get; } 9 Socket Server { get; }
9 bool HandlesRegion(Location x); 10 bool HandlesRegion(Location x);
11 void AddScene(Scene x);
12
13 void Start();
14 void Stop();
10 } 15 }
11} \ No newline at end of file 16} \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index f85dcc2..b5ace50 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -35,6 +35,7 @@ using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications.Cache; 36using OpenSim.Framework.Communications.Cache;
37using OpenSim.Region.ClientStack.LindenUDP; 37using OpenSim.Region.ClientStack.LindenUDP;
38using OpenSim.Region.Environment.Scenes;
38 39
39namespace OpenSim.Region.ClientStack.LindenUDP 40namespace OpenSim.Region.ClientStack.LindenUDP
40{ 41{
@@ -95,6 +96,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
95 return x == m_location; 96 return x == m_location;
96 } 97 }
97 98
99 public void AddScene(Scene x)
100 {
101 LocalScene = x;
102 }
103
104 public void Start()
105 {
106 ServerListener();
107 }
108
109 public void Stop()
110 {
111 m_socket.Close();
112 }
113
98 public LLUDPServer() 114 public LLUDPServer()
99 { 115 {
100 } 116 }
@@ -318,12 +334,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
318 ack_it.Header.Reliable = false; 334 ack_it.Header.Reliable = false;
319 SendPacketTo(ack_it.ToBytes(),ack_it.ToBytes().Length,SocketFlags.None,p.CircuitCode.Code); 335 SendPacketTo(ack_it.ToBytes(),ack_it.ToBytes().Length,SocketFlags.None,p.CircuitCode.Code);
320 } 336 }
321 else
322 {
323 // invalid client
324 //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
325 //m_log.Warn("[UDPSERVER]: Got a packet from an invalid client - " + packet.ToString());
326 }
327 } 337 }
328 catch (Exception) 338 catch (Exception)
329 { 339 {
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 1102fb4..3fa2371 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -107,12 +107,12 @@ namespace OpenSim.Region.ClientStack
107 return physicsPluginManager.GetPhysicsScene(engine, meshEngine); 107 return physicsPluginManager.GetPhysicsScene(engine, meshEngine);
108 } 108 }
109 109
110 protected Scene SetupScene(RegionInfo regionInfo, out LLUDPServer udpServer, bool m_permissions) 110 protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer udpServer, bool m_permissions)
111 { 111 {
112 return SetupScene(regionInfo, 0, out udpServer, m_permissions); 112 return SetupScene(regionInfo, 0, out udpServer, m_permissions);
113 } 113 }
114 114
115 protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out LLUDPServer udpServer, bool m_permissions) 115 protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out IClientNetworkServer udpServer, bool m_permissions)
116 { 116 {
117 AgentCircuitManager circuitManager = new AgentCircuitManager(); 117 AgentCircuitManager circuitManager = new AgentCircuitManager();
118 IPAddress listenIP = regionInfo.InternalEndPoint.Address; 118 IPAddress listenIP = regionInfo.InternalEndPoint.Address;
@@ -124,8 +124,8 @@ namespace OpenSim.Region.ClientStack
124 regionInfo.InternalEndPoint.Port = (int)port; 124 regionInfo.InternalEndPoint.Port = (int)port;
125 125
126 Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); 126 Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
127 127
128 udpServer.LocalScene = scene; 128 udpServer.AddScene(scene);
129 129
130 scene.LoadWorldMap(); 130 scene.LoadWorldMap();
131 131