hb_inetGetHosts()

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

Advertisements

3 responses to “hb_inetGetHosts()

  1. Pingback: Harbour All Functions – H | Viva Clipper !

  2. Pingback: Harbour inet Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s