Win7-64bit makinesinde bir .Net yuvası sunucu kodu çalıştırmaya çalışıyordum.
aşağıdaki hatayı almaya devam:SocketException: adres istenen iletişim kuralıyla uyumsuz
System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used.
Error Code: 10047
kod parçacığı geçerli:
IPAddress ipAddress = Dns.GetHostEntry("localhost").AddressList[0];
IPEndPoint ip = new IPEndPoint(ipAddress, 9989);
Socket serverSocket = new Socket(AddressFamily.InterNetwork,SocketType.Stream, ProtocolType.Tcp);
try
{
serverSocket.Bind(ip);
serverSocket.Listen(10);
serverSocket.BeginAccept(new AsyncCallback(AcceptConn), serverSocket);
}
catch (SocketException excep)
{
Log("Native code:"+excep.NativeErrorCode);
// throw;
}
Yukarıdaki kod Win-XP SP3, gayet iyi çalışıyor.
Error code details on MSDN'u kontrol ettim, ancak bu bana mantıklı gelmiyor.
Herkes benzer sorunlarla karşılaştı? Herhangi bir yardım?
http://stackoverflow.com/a/36150831/2459296 – Salim