Net::ResolveHostname

Net::ResolveHostname(hostname, addressFamily): String

Resolve hostname to IP address

Table 1. Parameters

hostname

String

Hostname

addressFamily

Integer

Optional. 6 to resolve to an IPv6 address; any other value or omitted resolves to IPv4.

The function is registered with a fixed count of one argument, so a call with addressFamily fails with an invalid argument count error and only IPv4 resolution is available (known issue, netxms#3804).
Return

IP address of the requested family as a String, or null if the name cannot be resolved.

println(Net::ResolveHostname("localhost")); //Will print "127.0.0.1"