Skip to content
Resolve domain names from EventMachine with libasyncns
Ruby C++
Find file
Latest commit 30b4882 @astro gemspec: rm rm'ed file


Connecting to hostnames from EventMachine? Dissatisfied from the Dnsruby experience? Disappointed by the lack of EventMachine support in Dnsruby trunk? Then you want this.


    require 'em/resolver' {
      res =
      q = res.getaddrinfo("localhost")
      q.callback do |addresses|
        addresses.each { |address|
          spam! address
      q.errback do |error|
        puts "Oh noes: #{error}"

Dnsruby compatibility

A drop-in replacement for Dnsruby is provided given you use the library exactly as stated in the EventMachine FAQ.

See spec/dnsruby_spec.rb for details.

ext/asyncns.h included in a slightly modified form because the original one had parameter names like `class' which prevents compiling as C++.

Something went wrong with that request. Please try again.