aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/ClientManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/ClientManager.cs22
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Framework/General/ClientManager.cs b/OpenSim/Framework/General/ClientManager.cs
index c3b3d94..e34c051 100644
--- a/OpenSim/Framework/General/ClientManager.cs
+++ b/OpenSim/Framework/General/ClientManager.cs
@@ -26,16 +26,14 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic; 29using System.Collections.Generic;
31using System.Text;
32using libsecondlife.Packets;
33using OpenSim.Framework.Interfaces;
34using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets;
35 32
36namespace OpenSim.Framework 33namespace OpenSim.Framework
37{ 34{
38 public delegate void ForEachClientDelegate(IClientAPI client); 35 public delegate void ForEachClientDelegate(IClientAPI client);
36
39 public class ClientManager 37 public class ClientManager
40 { 38 {
41 private Dictionary<uint, IClientAPI> m_clients; 39 private Dictionary<uint, IClientAPI> m_clients;
@@ -63,7 +61,7 @@ namespace OpenSim.Framework
63 m_clients.Add(id, client); 61 m_clients.Add(id, client);
64 } 62 }
65 63
66 public void InPacket(uint circuitCode, libsecondlife.Packets.Packet packet) 64 public void InPacket(uint circuitCode, Packet packet)
67 { 65 {
68 IClientAPI client; 66 IClientAPI client;
69 67
@@ -83,10 +81,10 @@ namespace OpenSim.Framework
83 } 81 }
84 } 82 }
85 83
86 public void CloseAllCircuits( LLUUID agentId ) 84 public void CloseAllCircuits(LLUUID agentId)
87 { 85 {
88 uint[] circuits = GetAllCircuits(agentId); 86 uint[] circuits = GetAllCircuits(agentId);
89 foreach (uint circuit in circuits ) 87 foreach (uint circuit in circuits)
90 { 88 {
91 IClientAPI client; 89 IClientAPI client;
92 if (m_clients.TryGetValue(circuit, out client)) 90 if (m_clients.TryGetValue(circuit, out client))
@@ -94,7 +92,7 @@ namespace OpenSim.Framework
94 Remove(circuit); 92 Remove(circuit);
95 client.Close(); 93 client.Close();
96 } 94 }
97 } 95 }
98 } 96 }
99 97
100 private uint[] GetAllCircuits(LLUUID agentId) 98 private uint[] GetAllCircuits(LLUUID agentId)
@@ -103,16 +101,16 @@ namespace OpenSim.Framework
103 101
104 foreach (KeyValuePair<uint, IClientAPI> pair in m_clients) 102 foreach (KeyValuePair<uint, IClientAPI> pair in m_clients)
105 { 103 {
106 if( pair.Value.AgentId == agentId ) 104 if (pair.Value.AgentId == agentId)
107 { 105 {
108 circuits.Add( pair.Key ); 106 circuits.Add(pair.Key);
109 } 107 }
110 } 108 }
111 109
112 return circuits.ToArray(); 110 return circuits.ToArray();
113 } 111 }
114 112
115 113
116 public void ViewerEffectHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock) 114 public void ViewerEffectHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock)
117 { 115 {
118 ViewerEffectPacket packet = new ViewerEffectPacket(); 116 ViewerEffectPacket packet = new ViewerEffectPacket();
@@ -134,4 +132,4 @@ namespace OpenSim.Framework
134 return m_clients.TryGetValue(circuitId, out user); 132 return m_clients.TryGetValue(circuitId, out user);
135 } 133 }
136 } 134 }
137} 135} \ No newline at end of file