Module: ServerUptimeMonitor
- Defined in:
- lib/server_uptime_monitor.rb
Class Method Summary collapse
Class Method Details
.check(host = "localhost", port = 80, timeout = 5) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/server_uptime_monitor.rb', line 4 def self.check(host = "localhost", port = 80, timeout = 5) socket = TCPSocket.new(host, port) socket.close true rescue StandardError false end |