Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,42 @@ | ||
Motivation | ||
========== | ||
|
||
Connecting to hostnames from EventMachine? Dissatisfied from the | ||
Dnsruby experience? Disappointed by the lack of EventMachine support | ||
in Dnsruby trunk? Then you want this. | ||
|
||
|
||
Usage | ||
===== | ||
|
||
require 'em/resolver' | ||
EM.run { | ||
res = EventMachine::Resolver.new | ||
q = res.getaddrinfo("localhost") | ||
q.callback do |addresses| | ||
addresses.each { |address| | ||
spam! address | ||
} | ||
end | ||
q.errback do |error| | ||
puts "Oh noes: #{error}" | ||
end | ||
} | ||
|
||
|
||
ext/asyncns.h | ||
========= | ||
|
||
...is included in a slightly modified form because the original one | ||
had parameter names like `class' which prevents compiling as C++. | ||
|
||
|
||
TODO | ||
==== | ||
|
||
- Dnsruby compat | ||
- remove C++ cruft | ||
- Rakefile | ||
- Gem | ||
- resolve many times | ||
- implement timeouts | ||
- check for space-leaks |