TCPName2Addr

Command group Flag affected Reversible Execute on client Platform(s)
External commands YES NO NO All

Syntax

TCPName2Addr (hostname[,ipv6 {Default kFalse}]) Returns address

Description

Note: The flag is set according to whether Omnis was able to make a call to this external command.

This Web command is multi-threaded, allowing another thread to execute in the multi-threaded server while it runs. Note that the same socket cannot safely be used concurrently by more than one thread.

TCPName2Addr is a domain name service command that returns the IP address for a given Hostname.

Hostname is an Omnis Character field containing a hostname to convert to an IP address. The hostname is of the form machine[.domainame.dom]

Address is an Omnis Character field which receives the IP Address corresponding to the given hostname. The IP address is of the form 255.255.255.254

Note: This command fails if the address of a Domain Name Server has not been defined in your computer. Not all host IP Addresses may be known to the Domain Name Server. If the Domain Name Server is busy or unavailable, the command times out and returns an error. Defining often-used servers to a local host’s file or using a caching Domain Name Server increases performance of this command.

Example

; Return the IP address for pHostName
TCPName2Addr (pHostName) Returns lIPAddress
Quit method lIPAddress