Class: Hiredis::Ext::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/hiredis/ext/connection.rb

Instance Method Summary collapse

Instance Method Details

#_disconnectObject



8
# File 'lib/hiredis/ext/connection.rb', line 8

alias :_disconnect :disconnect

#_readObject



16
# File 'lib/hiredis/ext/connection.rb', line 16

alias :_read :read

#disconnectObject



10
11
12
13
14
# File 'lib/hiredis/ext/connection.rb', line 10

def disconnect
  _disconnect
ensure
  @sock = nil
end

#readObject



18
19
20
21
22
# File 'lib/hiredis/ext/connection.rb', line 18

def read
  _read
rescue ::EOFError
  raise Errno::ECONNRESET
end

#sockObject



24
25
26
# File 'lib/hiredis/ext/connection.rb', line 24

def sock
  @sock ||= Socket.for_fd(fileno)
end