HB_INETGETHOSTS()
Get an array of IP addresses of a host
Syntax
HB_INETGETHOSTS( <cName> ) -> aHosts
Arguments
<cName>
Returns
An array of IP addresses
Description
Returns an array containing all the IP addresses associated with a given host name. The IP addressess returned by this funtion are strings in quad dot notations, eg “192.168.1.1”, and can be directly used into hb_InetConnectIP().
cName can be any string: valid DNS names (eg. “www.myserver.com”), locally available names (e.g. “localhost” or windows Network Neighborhood names), or even IP addresses in quad dot notation.
NOTE: This function is not thread safe (by design), and programmers must be sure not to use it at the same time in two different threads, or not to use it together with a hb_InetConnect(). If this kind of situation should ever arise, you are advised to use a thread MUTEX.
On error, and if the server can’t be found, the function returns NIL.
Compliance
Harbour