canConnect: Determines if connection is possible

Description Usage Arguments Value Note Examples

Description

Pings the specified URL(s) and/or IP address(es) to determine if connection can be made/internet is up/websites are up.

Usage

1
2
canConnect(test.site = "8.8.8.8", n = 1, timeout = 1000, clean = TRUE,
  ipkey = NULL)

Arguments

test.site

Character; the site URL or IP address to test connection to. Defaults to "8.8.8.8", Google's DNS-A server. Function

n

Numeric; number of times to try the connection. Defaults to 1

timeout

Numeric; time (in milliseconds) to try to connect before returning FALSE. Defaults to 1000ms (1s)

clean

Logical; should the input test.site be parsed automatically? Defaults to TRUE

ipkey

Character; optional argument used if test.site is directed to the test connection to the SMIF server.

Value

Logical; logical vector corresponding to whether or not a connection could be made to given site(s). Length will be equal to length(test.site)

Note

To simply test if internet connection is possible, run canConnect() or canConnect To test specific sites: Google A: "8.8.8.8", Google B: "8.8.4.4", Google Search: "www.google.com" or "google.com"

Examples

1

alec25/smif.package documentation built on May 22, 2019, 12:36 p.m.