Easy enough to do. Modify SockIOPool's SetServer(ArrayList servers) with the code below. While .NET 1's Dns.Resolve will work with 2.0, I'm using 2.0's recommended GetHostEntry.
I still need to do some testing to see what kind of throughput this gets. MS says I should be able to just use the DNS resolution without loss of performance even on IP addresses but I would like to test this out before I drop the initial check for an IP address
Logged In: YES
user_id=1827507
Originator: NO
Easy enough to do. Modify SockIOPool's SetServer(ArrayList servers) with the code below. While .NET 1's Dns.Resolve will work with 2.0, I'm using 2.0's recommended GetHostEntry.
I still need to do some testing to see what kind of throughput this gets. MS says I should be able to just use the DNS resolution without loss of performance even on IP addresses but I would like to test this out before I drop the initial check for an IP address
public void SetServers(ArrayList servers)
{
for (int i = 0; i < servers.Count; i++)
{
try
{
Convert.ToInt64(servers[i].ToString().Replace(".", "").Replace(":", ""));
}
catch
{
string PortNumber = servers[i].ToString().Substring(servers[i].ToString().IndexOf(":"));
// .NET 1
//ResolvedServers.Append(Dns.Resolve(servers[i].ToString().Substring(0, servers[i].ToString().LastIndexOf(":"))).AddressList[0].ToString());
servers[i] = Dns.GetHostEntry(servers[i].ToString().Substring(0, servers[i].ToString().LastIndexOf(":"))).AddressList[0].ToString() + PortNumber;
}
}
_servers = servers;
}