module Async::IO

Constants

Address
BLOCK_SIZE

The default block size for IO buffers. Defaults to 64KB (typical pipe buffer size).

BinaryString

This is deprecated.

MAXIMUM_READ_SIZE

The maximum read size when appending to IO buffers. Defaults to 8MB.

SSLError
STDERR
STDIN
STDOUT
SecureEndpoint

Backwards compatibility.

VERSION

Public Class Methods

file_descriptor_limit() click to toggle source
# File lib/async/io.rb, line 34
def self.file_descriptor_limit
        Process.getrlimit(Process::RLIMIT_NOFILE).first
end
pipe() click to toggle source
# File lib/async/io/generic.rb, line 43
def self.pipe
        ::IO.pipe.map(&Generic.method(:new))
end
try_convert(io, &block) click to toggle source

Convert a Ruby ::IO object to a wrapped instance:

# File lib/async/io/generic.rb, line 35
def self.try_convert(io, &block)
        if wrapper_class = Generic::WRAPPERS[io.class]
                wrapper_class.new(io, &block)
        else
                raise ArgumentError.new("Unsure how to wrap #{io.class}!")
        end
end