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



1135
1136
1137
# File 'lib/memcache.rb', line 1135

def gets
  readuntil("\n")
end

#rbuf_fillObject



1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
# File 'lib/memcache.rb', line 1117

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



1131
1132
1133
# File 'lib/memcache.rb', line 1131

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