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

In firebird-support@yahoogroups.com, Helen Borrie wrote:

> The IP address gets passed to the network pipe or layer as a string.
If
> 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);

Regards,
Peter Jacobi