Home > Language Reference > Classes > StreamSocket

GetHostByName Function

Looks up a host IP address given its host name.

Syntax

Public Function GetHostByName(ByRef sHost As String) As String

ParameterDescription
sHostDomain name to be resolved.

Remarks

The GetHostByName looks up a host IP address given its host name. The name should be specified in the sHost parameter. If the lookup is successful, the host IP address is returned as a string containing a dotted decimal address. If the name could not be resolved within the delay specified by the Timeout property, or if the lookup is unsuccessful, an empty string is returned.

This function can be used even if the socket was not previously opened by a call to the Connect.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A