hi,
i love this little lib. just what i needed! I would really love to see it in boost!
one detail that i found (version 0.1.0 & 0.1.1) is, that the library binds the local udp socket to port 53. at least under linux. this is bad, because you have to be root or you will get "operation not permitted" and it's also a problem if there is an program already binding to that port (dns-server!).
i have this "works for me" patch (0.1.0), but i don't know if this is the right solution:
QUOTE:
diff -ur asio_dns_orig/boost/asio/dns/resolve.hpp asio_dns/boost/asio/dns/resolve.hpp
--- asio_dns_orig/boost/asio/dns/resolve.hpp 2007-09-04 22:51:21.000000000 +0200
+++ asio_dns/boost/asio/dns/resolve.hpp 2007-09-04 22:57:13.000000000 +0200
@@ -95,7 +95,7 @@
/// Constructor for the resolve class
resolve()
: ioservice(),
- socket(ioservice, ip::udp::endpoint(ip::udp::v4(), 53)),
+ socket(ioservice, ip::udp::endpoint(ip::udp::v4(), 0)),
retry_timer(ioservice),
death_timer(ioservice),
death_timeout(30)
so that it binds to a free local port.
again, thanks for that great stuff