class Redis::Connection::UNIXSocket

Public Class Methods

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

Public Instance Methods

_read_from_socket(nbytes) click to toggle source

JRuby raises Errno::EAGAIN on read_nonblock even when IO.select says it is readable (1.6.6, in both 1.8 and 1.9 mode). Use the blocking readpartial method instead.

# File lib/redis/connection/ruby.rb, line 101
def _read_from_socket(nbytes)
  readpartial(nbytes)

rescue EOFError
  raise Errno::ECONNRESET
end