diff options
author | lbsa71 | 2007-07-09 21:03:36 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-09 21:03:36 +0000 |
commit | 08a1fa3f96eee5e067475da453a3770ff15780f9 (patch) | |
tree | 1ed047e466e20dcf327f8c890efbf1779ead6ad6 /OpenSim/Framework/General/ClientManager.cs | |
parent | * Ignored all those autogenned build files (diff) | |
download | opensim-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/ClientManager.cs')
-rw-r--r-- | OpenSim/Framework/General/ClientManager.cs | 31 |
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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Framework.Interfaces; | ||
5 | |||
6 | namespace 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 | } | ||