Module: Connectivity
- Defined in:
- lib/ibm_appconfiguration_ruby_sdk/configurations/internal/websocket_client/connectivity.rb
Class Method Summary collapse
Class Method Details
.check_internet ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/ibm_appconfiguration_ruby_sdk/configurations/internal/websocket_client/connectivity.rb', line 21 def self.check_internet Timeout.timeout(5) do dns = Resolv::DNS.new(nameserver: ["8.8.8.8"]) dns.getaddress("cloud.ibm.com") return true end rescue StandardError false end |