class Redis::Connection::TCPSocket

Public Class Methods

connect(host, port, timeout) click to toggle source
# File lib/redis/connection/ruby.rb, line 72
def self.connect(host, port, timeout)
  Timeout.timeout(timeout) do
    sock = new(host, port)
    sock
  end
rescue Timeout::Error
  raise TimeoutError
end