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



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

def gets
  readuntil("\n")
end

#rbuf_fillObject



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

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



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

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