Subject Re: Connection to server takes 2 minutes
Author peter_jacobi.rm
Hi Helen, All,

In, Helen Borrie wrote:

> The IP address gets passed to the network pipe or layer as a string.
> the string can't be resolved to a <servername> parameter in the
local HOSTS
> file and DHCP can't identify it (or isn't running), only then does the
> network layer break the string up and try it out as an IP address.

Whereas I agree on NetBUI advice etc, the above isn't quite
true - it is possible and much saner to look firs for
a dottet decimal:

host.s_addr = inet_addr (servername);
if (host.s_addr == INADDR_NONE) {
// Wasn't an IP address string, assume it is a name
hostent *hostentry = gethostbyname (servername);

Peter Jacobi