diff --git a/websocket-sharp/Net/EndPointListener.cs b/websocket-sharp/Net/EndPointListener.cs index 50458972..770f131e 100644 --- a/websocket-sharp/Net/EndPointListener.cs +++ b/websocket-sharp/Net/EndPointListener.cs @@ -461,58 +461,6 @@ namespace WebSocketSharp.Net ); } - public void AddPrefix (HttpListenerPrefix prefix, HttpListener listener) - { - List current, future; - if (prefix.Host == "*") { - do { - current = _unhandled; - future = current != null - ? new List (current) - : new List (); - - prefix.Listener = listener; - addSpecial (future, prefix); - } - while (Interlocked.CompareExchange (ref _unhandled, future, current) != current); - - return; - } - - if (prefix.Host == "+") { - do { - current = _all; - future = current != null - ? new List (current) - : new List (); - - prefix.Listener = listener; - addSpecial (future, prefix); - } - while (Interlocked.CompareExchange (ref _all, future, current) != current); - - return; - } - - Dictionary prefs, prefs2; - do { - prefs = _prefixes; - if (prefs.ContainsKey (prefix)) { - if (prefs[prefix] != listener) { - throw new HttpListenerException ( - 87, String.Format ("There's another listener for {0}.", prefix) - ); - } - - return; - } - - prefs2 = new Dictionary (prefs); - prefs2[prefix] = listener; - } - while (Interlocked.CompareExchange (ref _prefixes, prefs2, prefs) != prefs); - } - public void Close () { _socket.Close ();