Sha256: 5d18070e4a385dc938ada52f9a32e56055e5a2e92b650c330515e4fae68f359c

Contents?: true

Size: 283 Bytes

Versions: 14

Compression:

Stored size: 283 Bytes

Contents

module KubeAutoAnalyzer
require 'socket'

def self.is_port_open?(ip, port)
  begin
    Socket.tcp(ip, port, connect_timeout: 2)
  rescue Errno::ECONNREFUSED
    return false
  rescue Errno::ETIMEDOUT
    return false
  rescue Errno::ENETUNREACH
    return false
  end
  true
end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kube_auto_analyzer-0.0.17 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.16 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.15 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.14 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.13 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.12 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.11 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.10 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.9 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.8 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.7 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.6 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.5 lib/kube_auto_analyzer/utility/network.rb
kube_auto_analyzer-0.0.4 lib/kube_auto_analyzer/utility/network.rb