Parent

TCPSocket

Public Class Methods

wait_for_service_termination_with_timeout(options) click to toggle source
# File lib/webrat/core_extensions/tcp_socket.rb, line 15
def self.wait_for_service_termination_with_timeout(options)
  start_time = Time.now

  while listening_service?(options)
    verbose_wait

    if options[:timeout] && (Time.now > start_time + options[:timeout])
      raise SocketError.new("Socket did not terminate within #{options[:timeout]} seconds")
    end
  end
end
wait_for_service_with_timeout(options) click to toggle source
# File lib/webrat/core_extensions/tcp_socket.rb, line 3
def self.wait_for_service_with_timeout(options)
  start_time = Time.now

  until listening_service?(options)
    verbose_wait

    if options[:timeout] && (Time.now > start_time + options[:timeout])
      raise SocketError.new("Socket did not open within #{options[:timeout]} seconds")
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.