aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common/OpenSim.Servers/SocketRegistry.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Common/OpenSim.Servers/SocketRegistry.cs63
1 files changed, 0 insertions, 63 deletions
diff --git a/Common/OpenSim.Servers/SocketRegistry.cs b/Common/OpenSim.Servers/SocketRegistry.cs
deleted file mode 100644
index 2ebf80c..0000000
--- a/Common/OpenSim.Servers/SocketRegistry.cs
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Created by SharpDevelop.
3 * User: Adam Stevenson
4 * Date: 6/13/2007
5 * Time: 12:55 AM
6 *
7 * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 */
9
10using System;
11using System.Collections.Generic;
12using System.Net;
13using System.Net.Sockets;
14
15namespace OpenSim.Servers
16{
17 /// <summary>
18 ///
19 /// </summary>
20 public class SocketRegistry
21 {
22 static List<Socket> _Sockets;
23
24 static SocketRegistry()
25 {
26 _Sockets = new List<Socket>();
27 }
28
29 private SocketRegistry()
30 {
31
32 }
33
34 public static void Register(Socket pSocket)
35 {
36 _Sockets.Add(pSocket);
37 }
38
39 public static void Unregister(Socket pSocket)
40 {
41 _Sockets.Remove(pSocket);
42 }
43
44 public static void UnregisterAllAndClose()
45 {
46 int iSockets = _Sockets.Count;
47
48 for (int i = 0; i < iSockets; i++)
49 {
50 try
51 {
52 _Sockets[i].Close();
53 }
54 catch
55 {
56
57 }
58 }
59
60 _Sockets.Clear();
61 }
62 }
63}