Class providing static network utility functions.

Static methods

staticgetHostInfo(host:String):Array<String>

Resolves a hostname to a list of IP addresses.

Parameters:

host

The hostname to resolve.

Returns:

An array of IP address strings.

staticgetNetworkInterfaces():Array<NetworkInterfaceInfo>

Retrieves a list of all available network interfaces and their details.

Returns:

An array of NetworkInterfaceInfo objects.

@:value({ timeoutMs : 1000 })staticping(host:String, timeoutMs:Int = 1000):Float

Sends an ICMP Echo Request to the specified host and waits for a reply.

Parameters:

host

The hostname or IP address to ping.

timeoutMs

Timeout in milliseconds (default 1000).

Returns:

The round-trip time in milliseconds, or -1.0 on error/timeout.