is_online: Is the computer online?

View source: R/ping-package.r

is_onlineR Documentation

Is the computer online?

Description

Check if the computer is online. It does three tries:

  • Retrieve Apple's Captive Portal test page, see apple_captive_test().

  • Queries myip.opendns.com on OpenDNS, see my_ip().

  • Retrieves icanhazip.com via HTTPS, see my_ip(). If any of these are successful, it returns TRUE.

Usage

is_online(timeout = 1)

Arguments

timeout

Timeout for the queries. (Note: it is currently not used for the DNS query.)

Value

Possible values:

  • TRUE Yes, online.

  • FALSE No, not online.

Examples


is_online()


pingr documentation built on Oct. 27, 2022, 1:06 a.m.