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



1086
1087
1088
# File 'lib/memcache.rb', line 1086

def gets
  readuntil("\n")
end

#rbuf_fillObject



1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
# File 'lib/memcache.rb', line 1068

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



1082
1083
1084
# File 'lib/memcache.rb', line 1082

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