How to resolve the algorithm DNS query step by step in the CoffeeScript programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm DNS query step by step in the CoffeeScript programming language
Table of Contents
Problem Statement
DNS is an internet service that maps domain names, like rosettacode.org, to IP addresses, like 66.220.0.231. Use DNS to resolve www.kame.net to both IPv4 and IPv6 addresses. Print these addresses.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm DNS query step by step in the CoffeeScript programming language
Source code in the coffeescript programming language
# runs under node.js
dns = require 'dns'
dns.resolve4 'www.kame.net', (err, addresses) ->
console.log 'IP4'
console.log addresses
dns.resolve6 'www.kame.net', (err, addresses) ->
console.log 'IP6'
console.log addresses
You may also check:How to resolve the algorithm Draw a sphere step by step in the Mathematica / Wolfram Language programming language
You may also check:How to resolve the algorithm Program name step by step in the Kotlin programming language
You may also check:How to resolve the algorithm File size step by step in the Ring programming language
You may also check:How to resolve the algorithm Parsing/Shunting-yard algorithm step by step in the Xojo programming language
You may also check:How to resolve the algorithm Determine if only one instance is running step by step in the FreeBASIC programming language