require "../src/asyncdns"

AsyncDNS::RR::A.new("crystal-lang.org", Socket::IPAddress.new("127.0.0.1", 0),
  1234)

query = AsyncDNS::Query.new("crystal-lang.org", AsyncDNS::DNSClass::IN,
  AsyncDNS::RRType::A)

resolver = AsyncDNS::Resolver.new
resolver.resolve(query) { |response| p response }

sleep 2
resolver.stop
sleep 2
