Class: Redis::Connection::UNIXSocket
- Inherits:
-
Socket
- Object
- Socket
- Redis::Connection::UNIXSocket
- Includes:
- SocketMixin
- Defined in:
- lib/redis/connection/ruby.rb,
lib/redis/connection/ruby.rb
Constant Summary
Constants included from SocketMixin
Class Method Summary collapse
Instance Method Summary collapse
-
#_read_from_socket(nbytes) ⇒ Object
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).
Methods included from SocketMixin
#_write_to_socket, #gets, #initialize, #read, #timeout=, #write, #write_timeout=
Class Method Details
.connect(path, timeout) ⇒ Object
147 148 149 150 151 152 153 154 |
# File 'lib/redis/connection/ruby.rb', line 147 def self.connect(path, timeout) Timeout.timeout(timeout) do sock = new(path) sock end rescue Timeout::Error raise TimeoutError end |
Instance Method Details
#_read_from_socket(nbytes) ⇒ Object
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.
160 161 162 163 164 165 |
# File 'lib/redis/connection/ruby.rb', line 160 def _read_from_socket(nbytes) readpartial(nbytes) rescue EOFError raise Errno::ECONNRESET end |