Class: Net::InternetMessageIO

Inherits:
Object
  • Object
show all
Defined in:
lib/net/daap/speed_hacks.rb,
lib/net/daap/speed_hacks.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#old_rbuf_fillObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/net/daap/speed_hacks.rb', line 3

def rbuf_fill
  begin
    @rbuf << @io.read_nonblock(65536)
  rescue Errno::EWOULDBLOCK
    if IO.select([@io], nil, nil, @read_timeout)
      @rbuf << @io.read_nonblock(65536)
    else
      raise Timeout::TimeoutError
    end
  end
end

#rbuf_fillObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/net/daap/speed_hacks.rb', line 4

def rbuf_fill
  begin
    @rbuf << @io.read_nonblock(65536)
  rescue Errno::EWOULDBLOCK
    if IO.select([@io], nil, nil, @read_timeout)
      @rbuf << @io.read_nonblock(65536)
    else
      raise Timeout::TimeoutError
    end
  end
end