Module: Async::IO
- Defined in:
- lib/async/io.rb,
lib/async/io/peer.rb,
lib/async/io/trap.rb,
lib/async/io/buffer.rb,
lib/async/io/server.rb,
lib/async/io/socket.rb,
lib/async/io/stream.rb,
lib/async/io/address.rb,
lib/async/io/generic.rb,
lib/async/io/version.rb,
lib/async/io/endpoint.rb,
lib/async/io/standard.rb,
lib/async/io/ssl_socket.rb,
lib/async/io/tcp_socket.rb,
lib/async/io/udp_socket.rb,
lib/async/io/unix_socket.rb,
lib/async/io/notification.rb,
lib/async/io/ssl_endpoint.rb,
lib/async/io/binary_string.rb,
lib/async/io/endpoint/each.rb,
lib/async/io/host_endpoint.rb,
lib/async/io/protocol/line.rb,
lib/async/io/unix_endpoint.rb,
lib/async/io/shared_endpoint.rb,
lib/async/io/socket_endpoint.rb,
lib/async/io/address_endpoint.rb,
lib/async/io/protocol/generic.rb
Defined Under Namespace
Modules: Peer, Protocol, Server Classes: AddressEndpoint, BasicSocket, Buffer, Endpoint, Generic, HostEndpoint, IPSocket, Notification, SSLEndpoint, SSLServer, SSLSocket, SharedEndpoint, Socket, SocketEndpoint, StandardError, StandardInput, StandardOutput, Stream, TCPServer, TCPSocket, Trap, UDPSocket, UNIXEndpoint, UNIXServer, UNIXSocket
Constant Summary collapse
- Address =
Addrinfo
- BLOCK_SIZE =
The default block size for IO buffers. Defaults to 64KB (typical pipe buffer size).
ENV.fetch('ASYNC_IO_BLOCK_SIZE', 1024*64).to_i
- MAXIMUM_READ_SIZE =
The maximum read size when appending to IO buffers. Defaults to 8MB.
ENV.fetch('ASYNC_IO_MAXIMUM_READ_SIZE', BLOCK_SIZE * 128 * 8).to_i
- VERSION =
"1.27.5"
- STDIN =
StandardInput.new
- STDOUT =
StandardOutput.new
- STDERR =
StandardError.new
- SSLError =
OpenSSL::SSL::SSLError
- SecureEndpoint =
Backwards compatibility.
SSLEndpoint
- BinaryString =
This is deprecated.
Buffer
Class Method Summary collapse
- .file_descriptor_limit ⇒ Object
- .pipe ⇒ Object
-
.try_convert(io, &block) ⇒ Object
Convert a Ruby ::IO object to a wrapped instance:.
Class Method Details
.file_descriptor_limit ⇒ Object
34 35 36 |
# File 'lib/async/io.rb', line 34 def self.file_descriptor_limit Process.getrlimit(Process::RLIMIT_NOFILE).first end |
.pipe ⇒ Object
43 44 45 |
# File 'lib/async/io/generic.rb', line 43 def self.pipe ::IO.pipe.map(&Generic.method(:new)) end |
.try_convert(io, &block) ⇒ Object
Convert a Ruby ::IO object to a wrapped instance:
35 36 37 38 39 40 41 |
# 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 |