lib/poolparty/modules/pinger.rb
# Test to see if the host has the available port open
# for response. 
Test to see if the host has the available port open
for response.
Test to see if the host has the available port open for response .
def ping_port(host, port=22, retry_times=400)
        connected = false
        retry_times.times do |i|
          begin
            break if connected = TCPSocket.new(host, port).is_a?(TCPSocket)
          rescue Exception => e
            sleep(2)
          end
        end
        connected
      end
def ping_port ( host , port = 22 , retry_times = 400 ) connected = false retry_times . times do | i | begin break if connected = TCPSocket . new ( host , port ) . is_a? ( TCPSocket ) rescue Exception => e sleep ( 2 ) end end connected end
Test to see if the host has the available port open
for response.
Test to see if the host has the available port open for response .
host
port
retry_times