Method internet.ping(+ 1 overload)
Overload
Sends an ICMP echo message to the specified website and returns true
if successful. Can be used to check Internet connectivity.
public static bool ping(string hostNameOrAddress = "google.com", int timeout = 5000)
Parameters
hostNameOrAddress (string)
Domain name like |
timeout (int)
Timeout in milliseconds. |
Returns
Remarks
Not all websites support it.
Overload(top)
Sends an ICMP echo message to the specified website and returns true
if successful. Gets the roundtrip time.
public static bool ping(out int roundtripTime, string hostNameOrAddress = "google.com", int timeout = 5000)
Parameters
roundtripTime (int) |
hostNameOrAddress (string)
Domain name like |
timeout (int)
Timeout in milliseconds. |
Returns
Remarks
Not all websites support it.