dns-binary-module
v1.0.1
Published
A Node.js addon for resolving DNS queries using native C++ code for enhanced performance.
Downloads
3
Readme
my-dns-addon
A Node.js addon for resolving DNS queries using native C++ code for enhanced performance.
Table of Contents
Installation
To install the dns-binary-module
, you can use npm:
npm install dns-binary-module
Usage
Here's a basic example of how to use the my-dns-addon in your Node.js project:
const dnsaddon = require('dns-binary-module');
dnsaddon.resolveDNS('example.com', (results) => {
results.forEach(result => console.log(result));
});
API
resolveDNS(domain, callback)
Resolve the DNS records for a given domain.
Parameters
domain (string): The domain name to resolve.
callback (function): A callback function that receives the DNS results. The callback is called with an array of result strings.
Example
dnsaddon.resolveDNS('example.com', (results) => {
results.forEach(result => console.log(result));
});