[Fix] Determine that IPAddress.IPv6Any is a local IP address if available
Fix for pull request #243.
This commit is contained in:
		@@ -1297,9 +1297,20 @@ namespace WebSocketSharp
 | 
			
		||||
      if (address == null)
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
      if (address.Equals (System.Net.IPAddress.Any) || System.Net.IPAddress.IsLoopback (address))
 | 
			
		||||
      if (address.Equals (System.Net.IPAddress.Any))
 | 
			
		||||
        return true;
 | 
			
		||||
 | 
			
		||||
      if (address.Equals (System.Net.IPAddress.Loopback))
 | 
			
		||||
        return true;
 | 
			
		||||
 | 
			
		||||
      if (Socket.OSSupportsIPv6) {
 | 
			
		||||
        if (address.Equals (System.Net.IPAddress.IPv6Any))
 | 
			
		||||
          return true;
 | 
			
		||||
 | 
			
		||||
        if (address.Equals (System.Net.IPAddress.IPv6Loopback))
 | 
			
		||||
          return true;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      var host = System.Net.Dns.GetHostName ();
 | 
			
		||||
      var addrs = System.Net.Dns.GetHostAddresses (host);
 | 
			
		||||
      foreach (var addr in addrs)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user