aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/PacketServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/PacketServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs28
1 files changed, 12 insertions, 16 deletions
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index 481e445..bceeeb3 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -40,7 +40,6 @@ namespace OpenSim.Region.ClientStack
40 { 40 {
41 private ClientStackNetworkHandler _networkHandler; 41 private ClientStackNetworkHandler _networkHandler;
42 private IScene _localScene; 42 private IScene _localScene;
43 public Dictionary<uint, IClientAPI> ClientThreads = new Dictionary<uint, IClientAPI>();
44 private ClientManager m_clientManager = new ClientManager(); 43 private ClientManager m_clientManager = new ClientManager();
45 public ClientManager ClientManager 44 public ClientManager ClientManager
46 { 45 {
@@ -66,20 +65,14 @@ namespace OpenSim.Region.ClientStack
66 /// </summary> 65 /// </summary>
67 /// <param name="circuitCode"></param> 66 /// <param name="circuitCode"></param>
68 /// <param name="packet"></param> 67 /// <param name="packet"></param>
69 public virtual void ClientInPacket(uint circuitCode, Packet packet) 68 public virtual void InPacket(uint circuitCode, Packet packet)
70 { 69 {
71 if (this.ClientThreads.ContainsKey(circuitCode)) 70 m_clientManager.InPacket(circuitCode, packet);
72 {
73 ClientThreads[circuitCode].InPacket(packet);
74 }
75 } 71 }
76 72
77 public virtual void ConnectionClosed(uint circuitCode) 73 public virtual void ConnectionClosed(uint circuitCode)
78 { 74 {
79 if (this.ClientThreads.ContainsKey(circuitCode)) 75 m_clientManager.ConnectionClosed(circuitCode);
80 {
81 ClientThreads[circuitCode].ConnectionClosed();
82 }
83 } 76 }
84 77
85 /// <summary> 78 /// <summary>
@@ -129,9 +122,9 @@ namespace OpenSim.Region.ClientStack
129 122
130 } 123 }
131 124
132 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, IClientAPI> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) 125 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions)
133 { 126 {
134 return new ClientView(remoteEP, initialcirpack, clientThreads, scene, assetCache, packServer, authenSessions ); 127 return new ClientView(remoteEP, initialcirpack, clientManager, scene, assetCache, packServer, authenSessions );
135 } 128 }
136 129
137 /// <summary> 130 /// <summary>
@@ -146,15 +139,18 @@ namespace OpenSim.Region.ClientStack
146 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager authenticateSessionsClass) 139 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager authenticateSessionsClass)
147 { 140 {
148 IClientAPI newuser = 141 IClientAPI newuser =
149 CreateNewClient(epSender, useCircuit, ClientThreads, _localScene, assetCache, this, 142 CreateNewClient(epSender, useCircuit, m_clientManager, _localScene, assetCache, this,
150 authenticateSessionsClass); 143 authenticateSessionsClass);
151 144
152 this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); 145 this.m_clientManager.Add(useCircuit.CircuitCode.Code, newuser);
153 this.m_clientManager.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser); 146
147 newuser.OnViewerEffect += m_clientManager.ViewerEffectHandler;
154 148
155 return true; 149 return true;
156 } 150 }
157 151
152
153
158 /// <summary> 154 /// <summary>
159 /// 155 ///
160 /// </summary> 156 /// </summary>