Hi,
I did a test with the hello project in democs of IceCS-3.1.0. I put the client side on 192.168.10.230,win2000 and the server side on 192.168.6.233,win2003. As a result, it is very slow to connect with the server.
I find some code in Network.cs of Ice project in IceCS-3.1.0 solution as follows:
public static string getNumericHost(string hostname)
{
int retry = 5;
repeatGetHostByName:
string numericHost;
try
{
#if ICE_DOTNET_1X
numericHost = Dns.GetHostByName(hostname).AddressList[0].ToString();
#else
numericHost = Dns.GetHostEntry(hostname).AddressList[0].ToString();
#endif
}
catch(Win32Exception ex)
{
if(ex.NativeErrorCode == WSATRY_AGAIN && --retry >= 0)
{
goto repeatGetHostByName;
}
Ice.DNSException e = new Ice.DNSException("address lookup failed", ex);
e.host = hostname;
throw e;
}
catch(System.Exception ex)
{
Ice.DNSException e = new Ice.DNSException("address lookup failed", ex);
e.host = hostname;
throw e;
}
return numericHost;
}
The reason for the problem is that when the client runs at "Dns.GetHostEntry(hostname).AddressList[0].ToString() " ,here hostname="192.168.6.233",it should wait for a while and then throws an Win32Exception about Host not found,No such host is known.
The problem didn't come out when the client and server in the same section or with c++ client.
what should I do for this?Could you help me how to solve this problem?Thanks.

Reply With Quote