Module: Async::IO
- Defined in:
- lib/async/io/trap.rb,
lib/async/io/buffer.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/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, Stream, TCPServer, TCPSocket, Trap, UDPSocket, UNIXServer, UNIXSocket
Constant Summary collapse
- Address =
Addrinfo
- VERSION =
"1.18.3"
- STDIN =
Generic.new($stdin)
- STDOUT =
Generic.new($stdout)
- STDERR =
Generic.new($stderr)
- SSLError =
OpenSSL::SSL::SSLError
- SecureEndpoint =
Backwards compatibility.
SSLEndpoint
- BinaryString =
This is deprecated.
Buffer
Class Method Summary collapse
-
.try_convert(io, &block) ⇒ Object
Convert a Ruby ::IO object to a wrapped instance:.
Class Method Details
.try_convert(io, &block) ⇒ Object
Convert a Ruby ::IO object to a wrapped instance:
27 28 29 30 31 32 33 |
# File 'lib/async/io/generic.rb', line 27 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 |