Class: MemCache::BufferedIO

Inherits:
Net::BufferedIO
  • Object
show all
Defined in:
lib/memcache.rb

Overview

:nodoc:

Constant Summary collapse

BUFSIZE =
1024 * 16

Instance Method Summary collapse

Instance Method Details

#getsObject



1147
1148
1149
# File 'lib/memcache.rb', line 1147

def gets
  readuntil("\n")
end

#rbuf_fillObject



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
# File 'lib/memcache.rb', line 1129

def rbuf_fill
  begin
    @rbuf << @io.read_nonblock(BUFSIZE)
  rescue Errno::EWOULDBLOCK
    retry unless @read_timeout
    if IO.select([@io], nil, nil, @read_timeout)
      retry
    else
      raise Timeout::Error, 'IO timeout'
    end
  end
end

#setsockopt(*args) ⇒ Object



1143
1144
1145
# File 'lib/memcache.rb', line 1143

def setsockopt(*args)
  @io.setsockopt(*args)
end