# File lib/reactor/reactor.rb, line 155
    def acceptor(host, port, handler = nil)
      impl = chandler(handler, self.method(:on_error))
      aimpl = Cproton.pn_reactor_acceptor(@impl, host, "#{port}", impl)
      Cproton.pn_decref(impl)
      if !aimpl.nil?
        return Acceptor.new(aimpl)
      else
        io = Cproton.pn_reactor_io(@impl)
        io_error = Cproton.pn_io_error(io)
        error_text = Cproton.pn_error_text(io_error)
        text = "(#{Cproton.pn_error_text(io_error)} (#{host}:#{port}))"
        raise IOError.new(text)
      end
    end