Module basic module

Module dns

dns domain name query module

Basic module, reference method:

1
var dns = require('dns');

Static function

resolve

Query the address of the given hostname

1
static NArray dns.resolve(String name) async;

Call parameters:

  • name: String, specify the host name

Return result:

  • NArray, Returns the queried ip string array

lookup

Query the address of the given hostname

1
static String dns.lookup(String name) async;

Call parameters:

  • name: String, specify the host name

Return result:

  • String, Return the queried ip string