aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorlbsa712007-09-25 06:33:18 +0000
committerlbsa712007-09-25 06:33:18 +0000
commiteb8640f368ab43b27395690404e845f09366c652 (patch)
tree736cca5f1e34fddfe1291046797547e4367afdb6 /OpenSim/Region/ClientStack
parent* Fixed Culture-variant parsing of config options (diff)
downloadopensim-SC-eb8640f368ab43b27395690404e845f09366c652.zip
opensim-SC-eb8640f368ab43b27395690404e845f09366c652.tar.gz
opensim-SC-eb8640f368ab43b27395690404e845f09366c652.tar.bz2
opensim-SC-eb8640f368ab43b27395690404e845f09366c652.tar.xz
* Now the OGS1GridServices has a LocalBackEndServices that it forwards intra-instance requests to
* Every Scene has a ClientManager (as every dog it's day) since two scenes can have the same circuit as client.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index 7134ad3..6fd4ba4 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -40,12 +40,13 @@ namespace OpenSim.Region.ClientStack
40 public class PacketServer 40 public class PacketServer
41 { 41 {
42 private ClientStackNetworkHandler m_networkHandler; 42 private ClientStackNetworkHandler m_networkHandler;
43 private IScene _localScene; 43 private IScene m_scene;
44 private readonly ClientManager m_clientManager = new ClientManager(); 44
45 public ClientManager ClientManager 45 //private readonly ClientManager m_clientManager = new ClientManager();
46 { 46 //public ClientManager ClientManager
47 get { return m_clientManager; } 47 //{
48 } 48 // get { return m_clientManager; }
49 //}
49 50
50 public PacketServer(ClientStackNetworkHandler networkHandler) 51 public PacketServer(ClientStackNetworkHandler networkHandler)
51 { 52 {
@@ -57,7 +58,7 @@ namespace OpenSim.Region.ClientStack
57 { 58 {
58 set 59 set
59 { 60 {
60 this._localScene = value; 61 this.m_scene = value;
61 } 62 }
62 } 63 }
63 64
@@ -68,7 +69,7 @@ namespace OpenSim.Region.ClientStack
68 /// <param name="packet"></param> 69 /// <param name="packet"></param>
69 public virtual void InPacket(uint circuitCode, Packet packet) 70 public virtual void InPacket(uint circuitCode, Packet packet)
70 { 71 {
71 m_clientManager.InPacket(circuitCode, packet); 72 m_scene.ClientManager.InPacket(circuitCode, packet);
72 } 73 }
73 74
74 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) 75 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions)
@@ -76,28 +77,27 @@ namespace OpenSim.Region.ClientStack
76 return new ClientView(remoteEP, initialcirpack, clientManager, scene, assetCache, packServer, authenSessions ); 77 return new ClientView(remoteEP, initialcirpack, clientManager, scene, assetCache, packServer, authenSessions );
77 } 78 }
78 79
79 /// <summary>
80 ///
81 /// </summary>
82 /// <param name="epSender"></param>
83 /// <param name="useCircuit"></param>
84 /// <param name="assetCache"></param>
85 /// <param name="inventoryCache"></param>
86 /// <param name="authenticateSessionsClass"></param>
87 /// <returns></returns>
88 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager authenticateSessionsClass) 80 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager authenticateSessionsClass)
89 { 81 {
90 IClientAPI newuser = 82 IClientAPI newuser;
91 CreateNewClient(epSender, useCircuit, m_clientManager, _localScene, assetCache, this,
92 authenticateSessionsClass);
93 83
94 this.m_clientManager.Add(useCircuit.CircuitCode.Code, newuser); 84 if (m_scene.ClientManager.TryGetClient(useCircuit.CircuitCode.Code, out newuser))
85 {
86 return false;
87 }
88 else
89 {
90 newuser = CreateNewClient(epSender, useCircuit, m_scene.ClientManager, m_scene, assetCache, this,
91 authenticateSessionsClass);
95 92
96 newuser.OnViewerEffect += m_clientManager.ViewerEffectHandler; 93 m_scene.ClientManager.Add(useCircuit.CircuitCode.Code, newuser);
97 newuser.OnLogout += LogoutHandler;
98 newuser.OnConnectionClosed += CloseClient;
99 94
100 return true; 95 newuser.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler;
96 newuser.OnLogout += LogoutHandler;
97 newuser.OnConnectionClosed += CloseClient;
98
99 return true;
100 }
101 } 101 }
102 102
103 public void LogoutHandler(IClientAPI client) 103 public void LogoutHandler(IClientAPI client)
@@ -127,7 +127,7 @@ namespace OpenSim.Region.ClientStack
127 public virtual void CloseCircuit(uint circuitcode) 127 public virtual void CloseCircuit(uint circuitcode)
128 { 128 {
129 m_networkHandler.RemoveClientCircuit( circuitcode ); 129 m_networkHandler.RemoveClientCircuit( circuitcode );
130 m_clientManager.CloseAllAgents( circuitcode ); 130 m_scene.ClientManager.CloseAllAgents(circuitcode);
131 } 131 }
132 132
133 public virtual void CloseClient( IClientAPI client ) 133 public virtual void CloseClient( IClientAPI client )