vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/test/ts_online.rb
# Tells whether or not we can connect to the Internet.
Tells whether or not we can connect to the Internet.
Tells whether or not we can connect to the Internet .
def online?
  sock = UDPSocket.new()
  online = false
  begin
    sock.connect('193.0.14.129', 25) 
    online = true
    sock.close
  rescue Exception => exception
    puts "
------------------------------------------------------------
Cannot bind to socket:
        #{exception}
This is an indication you have network problems.
No online tests will be run!!
------------------------------------------------------------
"
  end
  online
end
def online? sock = UDPSocket . new ( ) online = false begin sock . connect ( '193.0.14.129' , 25 ) online = true sock . close rescue Exception => exception puts "
------------------------------------------------------------
Cannot bind to socket:
        #{exception}

This is an indication you have network problems.
No online tests will be run!!
------------------------------------------------------------
" end online end
Tells whether or not we can connect to the Internet.
Tells whether or not we can connect to the Internet .
# that address is k.root-servers.net