pingHost

open fun pingHost(timeout: Int): Boolean

This method is used to ping a host on a specific port and get whether is reachable

Return

"true" if the host on the port inserted are available, "false" if is not reachable

Parameters

timeout

: custom timeout to wait for the ping


open fun pingHost(host: String, port: Int, timeout: Int): Boolean

This method is used to ping a host on a specific port and get whether is reachable

Return

"true" if the host on the port inserted are available, "false" if is not reachable

Parameters

host

: host to ping

port

: port of the host to ping

timeout

: custom timeout to wait for the ping