Software /
code /
prosody
Diff
net/dns.lua @ 2573:60493186fef6
net.dns: Removed some useless indirection to improve readability.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 10 Feb 2010 00:34:30 +0500 |
parent | 2425:772b2caf762e |
child | 2574:7a12578aadb1 |
line wrap: on
line diff
--- a/net/dns.lua Wed Feb 10 00:12:48 2010 +0500 +++ b/net/dns.lua Wed Feb 10 00:34:30 2010 +0500 @@ -927,37 +927,36 @@ return r; end +local _resolver = dns.resolver(); +dns._resolver = _resolver; function dns.lookup(...) -- - - - - - - - - - - - - - - - - - - - - lookup - return resolve(resolver.lookup, ...); + return _resolver:lookup(...); end function dns.purge(...) -- - - - - - - - - - - - - - - - - - - - - - purge - return resolve(resolver.purge, ...); + return _resolver:purge(...); end function dns.peek(...) -- - - - - - - - - - - - - - - - - - - - - - - peek - return resolve(resolver.peek, ...); + return _resolver:peek(...); end - function dns.query(...) -- - - - - - - - - - - - - - - - - - - - - - query - return resolve(resolver.query, ...); + return _resolver:query(...); end function dns.feed(...) -- - - - - - - - - - - - - - - - - - - - - - feed - return resolve(resolver.feed, ...); + return _resolver:feed(...); end function dns.cancel(...) -- - - - - - - - - - - - - - - - - - - - - - cancel - return resolve(resolver.cancel, ...); + return _resolver:cancel(...); end function dns:socket_wrapper_set(...) -- - - - - - - - - socket_wrapper_set - return resolve(resolver.socket_wrapper_set, ...); + return _resolver:socket_wrapper_set(...); end -dns._resolver = dns.resolver(); - return dns;