aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General
diff options
context:
space:
mode:
authorlbsa712007-07-09 21:03:36 +0000
committerlbsa712007-07-09 21:03:36 +0000
commit08a1fa3f96eee5e067475da453a3770ff15780f9 (patch)
tree1ed047e466e20dcf327f8c890efbf1779ead6ad6 /OpenSim/Framework/General
parent* Ignored all those autogenned build files (diff)
downloadopensim-SC_OLD-08a1fa3f96eee5e067475da453a3770ff15780f9.zip
opensim-SC_OLD-08a1fa3f96eee5e067475da453a3770ff15780f9.tar.gz
opensim-SC_OLD-08a1fa3f96eee5e067475da453a3770ff15780f9.tar.bz2
opensim-SC_OLD-08a1fa3f96eee5e067475da453a3770ff15780f9.tar.xz
* Introduced ClientManager for great justice.
Diffstat (limited to 'OpenSim/Framework/General')
-rw-r--r--OpenSim/Framework/General/ClientManager.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/ClientManager.cs b/OpenSim/Framework/General/ClientManager.cs
new file mode 100644
index 0000000..5b6e7b3
--- /dev/null
+++ b/OpenSim/Framework/General/ClientManager.cs
@@ -0,0 +1,31 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Interfaces;
5
6namespace OpenSim.Framework
7{
8 public delegate void ForEachClientDelegate( IClientAPI client );
9 public class ClientManager
10 {
11 private Dictionary<uint, IClientAPI> m_clientThreads;
12
13 public void ForEachClient(ForEachClientDelegate whatToDo)
14 {
15 foreach (IClientAPI client in m_clientThreads.Values)
16 {
17 whatToDo(client);
18 }
19 }
20
21 public ClientManager()
22 {
23 m_clientThreads = new Dictionary<uint, IClientAPI>();
24 }
25
26 public void Add(uint id, IClientAPI client )
27 {
28 m_clientThreads.Add( id, client );
29 }
30 }
31}