def on_readable
      begin
        on_read @_io.read_nonblock(INPUT_SIZE)
      rescue Errno::EAGAIN, Errno::EINTR
        return

      # SystemCallError catches Errno::ECONNRESET amongst others.
      rescue SystemCallError, EOFError, IOError, SocketError
        close
      end
    end
def on_readable
      begin
        on_read @_io.read_nonblock(INPUT_SIZE)
      rescue Errno::EAGAIN, Errno::EINTR
        return

      # SystemCallError catches Errno::ECONNRESET amongst others.
      rescue SystemCallError, EOFError, IOError, SocketError
        close
      end
    end
Read from the input buffer and dispatch to on_read