Subject: agsXMPP doesn't properly obtain server IP address
When going through some initial library tests, the client fails to connect to our server due to the automatic use of the first resolved ip address. The client is running on Windows Vista with IPv6 enabled. The first returned address for the server, which is running on the same machine as the client, is an IPv6 address. The server does not listen on IPv6 addresses, therefore the connection fails.
To properly resolve the server ip address, I had to make the following change at line 207 in ClientSocket.cs.
To properly resolve the server ip address, I had to make the following change at line 207 in ClientSocket.cs.
IPAddress ipAddress = null;
foreach (IPAddress address in ipHostInfo.AddressList)
{
if (address.AddressFamily == AddressFamily.InterNetwork)
{
ipAddress = address;
break;
}
}
foreach (IPAddress address in ipHostInfo.AddressList)
{
if (address.AddressFamily == AddressFamily.InterNetwork)
{
ipAddress = address;
break;
}
}
tbraun
Show profile
Link to this post
