Class: Invoker::Reactor::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/invoker/reactor/reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReader

Returns a new instance of Reader.



5
6
7
# File 'lib/invoker/reactor/reader.rb', line 5

def initialize
  @read_array = []
end

Instance Attribute Details

#read_arrayObject

Returns the value of attribute read_array.



3
4
5
# File 'lib/invoker/reactor/reader.rb', line 3

def read_array
  @read_array
end

Instance Method Details

#handle_read_event(read_ready_fds) ⇒ Object



13
14
15
16
# File 'lib/invoker/reactor/reader.rb', line 13

def handle_read_event(read_ready_fds)
  ready_fds = read_ready_fds.flatten.compact
  ready_fds.each { |ready_fd| process_read(ready_fd) }
end

#watch_for_read(socket) ⇒ Object



9
10
11
# File 'lib/invoker/reactor/reader.rb', line 9

def watch_for_read(socket)
  @read_array << socket
end