Class: IO
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/io/wait/wait.c |
Instance Attribute Summary
-
#ready? ⇒ Boolean
readonly
Returns true if input available without blocking, or false.
Instance Method Summary
-
#nread ⇒ Integer
Returns number of bytes that can be read without blocking.
-
#wait(timeout = nil, mode = :read) ⇒ IO, ...
Waits until
IO
is readable or writable without blocking and returnsself
, ornil
when times out. -
#wait_readable ⇒ IO, ...
Waits until
IO
is readable without blocking and returnsself
, ornil
when times out. -
#wait_writable ⇒ IO
Waits until
IO
is writable without blocking and returnsself
ornil
when times out.
Instance Attribute Details
#ready? ⇒ Boolean
(readonly)
Returns true if input available without blocking, or false. Returns nil if no information available.
Instance Method Details
#nread ⇒ Integer
Returns number of bytes that can be read without blocking. Returns zero if no information available.
#wait(timeout = nil, mode = :read) ⇒ IO
, ...
Waits until IO
is readable or writable without blocking and returns self
, or nil
when times out. Returns true
immediately when buffered data is available. Optional parameter mode
is one of :read
, :write
, or :read_write
.
#wait_readable ⇒ IO
, ...
#wait_readable(timeout) ⇒ IO
, ...
IO
, ...
#wait_readable(timeout) ⇒ IO
, ...
Waits until IO
is readable without blocking and returns self
, or nil
when times out. Returns true
immediately when buffered data is available.
#wait_writable ⇒ IO
#wait_writable(timeout) ⇒ IO
?
IO
#wait_writable(timeout) ⇒ IO
?
Waits until IO
is writable without blocking and returns self
or nil
when times out.