module IO
Nested
::AddressEndpoint::Buffer::CompositeEndpoint::Endpoint::Generic::HostEndpoint::Notification::Peer::Protocol::Server::SharedEndpoint::BasicSocket::Socket::IPSocket::SocketEndpoint::SSLEndpoint::SSLSocket::SSLServer::StandardInput::StandardOutput::StandardError::Stream::TCPSocket::TCPServer::Threads::Trap::UDPSocket::UNIXEndpoint::UNIXSocket::UNIXServer
Definitions
BinaryString = Buffer
This is deprecated.
BLOCK_SIZE = ENV.fetch('ASYNC_IO_BLOCK_SIZE', 1024*64).to_i
The default block size for IO buffers. Defaults to 64KB (typical pipe buffer size).
MAXIMUM_READ_SIZE = ENV.fetch('ASYNC_IO_MAXIMUM_READ_SIZE', BLOCK_SIZE * 128).to_i
The maximum read size when appending to IO buffers. Defaults to 8MB.
def self.try_convert(io, &block)
Convert a Ruby ::IO object to a wrapped instance:
Implementation
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
SecureEndpoint = SSLEndpoint
Backwards compatibility.