Method: RedisClient::RubyConnection#read
- Defined in:
- lib/redis_client/ruby_connection.rb
#read(timeout = nil) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/redis_client/ruby_connection.rb', line 95 def read(timeout = nil) if timeout.nil? RESP3.load(@io) else @io.with_timeout(timeout) { RESP3.load(@io) } end rescue RedisClient::RESP3::Error => error raise protocol_error(error.) rescue SystemCallError, IOError, OpenSSL::SSL::SSLError => error raise connection_error(error.) end |