Check whether an internet connection is available.
Attempts a socket connection to 8.8.8.8 on port 53.
True if the connection succeeds.
True
bool
Examples
>>> isinstance(has_internet(), bool) True