Created
May 31, 2012 19:48
-
-
Save anonymous/2845776 to your computer and use it in GitHub Desktop.
TestLocalEndPoint IPv6 fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MonoTests.System.Net | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
UdpClient client; | |
Socket s; | |
IPEndPoint localEP; | |
client = new UdpClient (IPEndPoint.MaxPort, AddressFamily.InterNetworkV6); | |
s = client.Client; | |
localEP = s.LocalEndPoint as IPEndPoint; | |
if (! IPAddress.IPv6Any.Equals (localEP.Address)) { | |
Console.WriteLine (IPAddress.IPv6Any); | |
Console.WriteLine (localEP.Address); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment