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/UDPServer.cs | |
parent | Goodbye World (diff) | |
download | opensim-SC-c746a2f9f4f0b1e7eea564effdae63472f79ab22.zip opensim-SC-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.gz opensim-SC-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.bz2 opensim-SC-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 '')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/UDPServer.cs | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs index 3a93e66..8ec5af1 100644 --- a/OpenSim/OpenSim.RegionServer/UDPServer.cs +++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs | |||
@@ -10,7 +10,6 @@ using System.Collections; | |||
10 | using System.Collections.Generic; | 10 | using System.Collections.Generic; |
11 | using libsecondlife; | 11 | using libsecondlife; |
12 | using libsecondlife.Packets; | 12 | using libsecondlife.Packets; |
13 | using OpenSim.world; | ||
14 | using OpenSim.Terrain; | 13 | using OpenSim.Terrain; |
15 | using OpenSim.Framework.Interfaces; | 14 | using OpenSim.Framework.Interfaces; |
16 | using OpenSim.Framework.Types; | 15 | using OpenSim.Framework.Types; |
@@ -24,7 +23,6 @@ using OpenSim.GenericConfig; | |||
24 | 23 | ||
25 | namespace OpenSim | 24 | namespace OpenSim |
26 | { | 25 | { |
27 | public delegate AuthenticateResponse AuthenticateSessionHandler(LLUUID sessionID, LLUUID agentID, uint circuitCode); | ||
28 | 26 | ||
29 | public class UDPServer : OpenSimNetworkHandler | 27 | public class UDPServer : OpenSimNetworkHandler |
30 | { | 28 | { |
@@ -39,18 +37,12 @@ namespace OpenSim | |||
39 | protected PacketServer _packetServer; | 37 | protected PacketServer _packetServer; |
40 | 38 | ||
41 | protected int listenPort; | 39 | protected int listenPort; |
42 | protected Grid m_gridServers; | 40 | protected IWorld m_localWorld; |
43 | protected World m_localWorld; | ||
44 | protected AssetCache m_assetCache; | 41 | protected AssetCache m_assetCache; |
45 | protected InventoryCache m_inventoryCache; | 42 | protected InventoryCache m_inventoryCache; |
46 | protected RegionInfo m_regionData; | ||
47 | protected bool m_sandbox = false; | ||
48 | protected bool user_accounts = false; | ||
49 | protected ConsoleBase m_console; | 43 | protected ConsoleBase m_console; |
50 | protected AuthenticateSessionsBase m_authenticateSessionsClass; | 44 | protected AuthenticateSessionsBase m_authenticateSessionsClass; |
51 | 45 | ||
52 | public AuthenticateSessionHandler AuthenticateHandler; | ||
53 | |||
54 | public PacketServer PacketServer | 46 | public PacketServer PacketServer |
55 | { | 47 | { |
56 | get | 48 | get |
@@ -63,7 +55,7 @@ namespace OpenSim | |||
63 | } | 55 | } |
64 | } | 56 | } |
65 | 57 | ||
66 | public World LocalWorld | 58 | public IWorld LocalWorld |
67 | { | 59 | { |
68 | set | 60 | set |
69 | { | 61 | { |
@@ -76,21 +68,15 @@ namespace OpenSim | |||
76 | { | 68 | { |
77 | } | 69 | } |
78 | 70 | ||
79 | public UDPServer(int port, Grid gridServers, AssetCache assetCache, InventoryCache inventoryCache, RegionInfo _regionData, bool sandbox, bool accounts, ConsoleBase console, AuthenticateSessionsBase authenticateClass) | 71 | public UDPServer(int port, AssetCache assetCache, InventoryCache inventoryCache, ConsoleBase console, AuthenticateSessionsBase authenticateClass) |
80 | { | 72 | { |
81 | listenPort = port; | 73 | listenPort = port; |
82 | this.m_gridServers = gridServers; | ||
83 | this.m_assetCache = assetCache; | 74 | this.m_assetCache = assetCache; |
84 | this.m_inventoryCache = inventoryCache; | 75 | this.m_inventoryCache = inventoryCache; |
85 | this.m_regionData = _regionData; | ||
86 | this.m_sandbox = sandbox; | ||
87 | this.user_accounts = accounts; | ||
88 | this.m_console = console; | 76 | this.m_console = console; |
89 | this.m_authenticateSessionsClass = authenticateClass; | 77 | this.m_authenticateSessionsClass = authenticateClass; |
90 | this.CreatePacketServer(); | 78 | this.CreatePacketServer(); |
91 | 79 | ||
92 | //set up delegate for authenticate sessions | ||
93 | this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_authenticateSessionsClass.AuthenticateSession); | ||
94 | } | 80 | } |
95 | 81 | ||
96 | protected virtual void CreatePacketServer() | 82 | protected virtual void CreatePacketServer() |
@@ -131,15 +117,8 @@ namespace OpenSim | |||
131 | { | 117 | { |
132 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet; | 118 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet; |
133 | this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); | 119 | this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); |
134 | bool isChildAgent = false; | ||
135 | 120 | ||
136 | ClientView newuser = new ClientView(epSender, useCircuit, m_localWorld, _packetServer.ClientThreads, m_assetCache, m_gridServers.GridServer, this, m_inventoryCache, m_sandbox, isChildAgent, this.m_regionData, m_authenticateSessionsClass); | 121 | this.PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_inventoryCache, m_authenticateSessionsClass); |
137 | if ((this.m_gridServers.UserServer != null) && (user_accounts)) | ||
138 | { | ||
139 | newuser.UserServer = this.m_gridServers.UserServer; | ||
140 | } | ||
141 | //OpenSimRoot.Instance.ClientThreads.Add(epSender, newuser); | ||
142 | this._packetServer.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); | ||
143 | } | 122 | } |
144 | 123 | ||
145 | public void ServerListener() | 124 | public void ServerListener() |
@@ -197,9 +176,6 @@ namespace OpenSim | |||
197 | } | 176 | } |
198 | } | 177 | } |
199 | 178 | ||
200 | public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode) | 179 | |
201 | { | ||
202 | return this.AuthenticateHandler(sessionID, agentID, circuitCode); | ||
203 | } | ||
204 | } | 180 | } |
205 | } \ No newline at end of file | 181 | } \ No newline at end of file |