Sha256: 59fae9de479c9284d547eccc304e0001ce42f92de07adf6eab70d50a7d5db0e8
Contents?: true
Size: 402 Bytes
Versions: 16
Compression:
Stored size: 402 Bytes
Contents
class IO def read_available_bytes(chunk_size = 1024, select_timeout = 5) buffer = [] return "" if closed? || eof? # IO.select cannot be used here due to the fact that it # just does not work on windows while true begin buffer << self.readpartial(chunk_size) sleep 0.1 rescue(EOFError) break end end return buffer.join end end
Version data entries
16 entries across 16 versions & 4 rubygems