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 a given hostname

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

Call parameters:

  • name: String, specify the host name

Return results:

  • NArray, returns the queried IP string array

lookup

Query the address of a given hostname

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

Call parameters:

  • name: String, specify the host name

Return results:

  • String, returns the queried IP string