# File lib/em/pure_ruby.rb, line 538 def eventable_read @last_activity = Reactor.instance.current_loop_time begin if io.respond_to?(:read_nonblock) 10.times { data = io.read_nonblock(4096) EventMachine::event_callback uuid, ConnectionData, data } else data = io.sysread(4096) EventMachine::event_callback uuid, ConnectionData, data end rescue Errno::EAGAIN, Errno::EWOULDBLOCK # no-op rescue Errno::ECONNRESET, Errno::ECONNREFUSED, EOFError @close_scheduled = true EventMachine::event_callback uuid, ConnectionUnbound, nil end end