class HTTPX::Selector::Monitor

  1. lib/httpx/selector.rb
Superclass: Object

I/O monitor

Methods

Public Class

  1. new

Public Instance

  1. close
  2. closed?
  3. interests
  4. io
  5. readable?
  6. readiness
  7. to_s
  8. writable?

Attributes

interests [RW]
io [RW]
readiness [RW]

Public Class methods

new (io, interests, reactor)
[show source]
   # File lib/httpx/selector.rb
16 def initialize(io, interests, reactor)
17   @io = io
18   @interests = interests
19   @reactor = reactor
20   @closed = false
21 end

Public Instance methods

close (deregister = true)

closes +@io+, deregisters from reactor (unless deregister is false)

[show source]
   # File lib/httpx/selector.rb
32 def close(deregister = true)
33   return if @closed
34 
35   @closed = true
36   @reactor.deregister(@io) if deregister
37 end
closed? ()
[show source]
   # File lib/httpx/selector.rb
39 def closed?
40   @closed
41 end
readable? ()
[show source]
   # File lib/httpx/selector.rb
23 def readable?
24   READABLE.include?(@interests)
25 end
to_s ()

:nocov:

[show source]
   # File lib/httpx/selector.rb
44 def to_s
45   "#<#{self.class}: #{@io}(closed:#{@closed}) #{@interests} #{object_id.to_s(16)}>"
46 end
writable? ()
[show source]
   # File lib/httpx/selector.rb
27 def writable?
28   WRITABLE.include?(@interests)
29 end