From 168c550370556e7343919f27bfb6cd276d439fd2 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 17 Feb 2015 17:32:31 +0900 Subject: [PATCH] Fix for issue #103, replaced the getEndPointListener (IPAddress, int, bool, HttpListener) method with the getEndPointListener (string, int, HttpListener, bool) method, to be same as the latest Mono --- websocket-sharp/Net/EndPointManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Net/EndPointManager.cs b/websocket-sharp/Net/EndPointManager.cs index 0267fb51..b74e9350 100644 --- a/websocket-sharp/Net/EndPointManager.cs +++ b/websocket-sharp/Net/EndPointManager.cs @@ -87,8 +87,8 @@ namespace WebSocketSharp.Net if (pref.Path.IndexOf ("//", StringComparison.Ordinal) != -1) throw new HttpListenerException (400, "Invalid path."); // TODO: Code? - // Always listens on all the interfaces, no matter the host name/ip used. - var epl = getEndPointListener (IPAddress.Any, pref.Port, pref.IsSecure, httpListener); + // listens on all the interfaces if host name cannot be parsed by IPAddress. + var epl = getEndPointListener (pref.Host, pref.Port, httpListener, pref.IsSecure); epl.AddPrefix (pref, httpListener); } @@ -179,7 +179,7 @@ namespace WebSocketSharp.Net if (pref.Path.IndexOf ("//", StringComparison.Ordinal) != -1) return; - var epl = getEndPointListener (IPAddress.Any, pref.Port, pref.IsSecure, httpListener); + var epl = getEndPointListener (pref.Host, pref.Port, httpListener, pref.IsSecure); epl.RemovePrefix (pref, httpListener); }