Dns.hx 742 B

123456789101112131415161718192021222324
  1. package asys.net;
  2. import haxe.async.*;
  3. /**
  4. Asynchronous Domain Name System (DNS) methods.
  5. **/
  6. extern class Dns {
  7. /**
  8. Looks up the given `hostname`. `callback` will be called once the operation
  9. completes. In case of success, the data given to callback is an array of
  10. `asys.net.Address` instances representing all the IP addresses found
  11. associated with the hostname.
  12. - `lookupOptions.family` - if not `null`, only addresses of the given IP
  13. family will be returned.
  14. **/
  15. static function lookup(hostname:String, ?lookupOptions:DnsLookupOptions, callback:Callback<Array<Address>>):Void;
  16. /**
  17. Looks up a reverse DNS entry for the given `ip`.
  18. **/
  19. static function reverse(ip:Address, callback:Callback<Array<String>>):Void;
  20. }