dns.lookup()

dns.lookup() Under the hood, dns.lookup() uses the same operating system facilities as most other programs. For instance, dns.lookup() will almost always resolve a given name the same way as the ping command. On most POSIX-like operating systems, the behavior of the dns.lookup() function can be modified by changing settings in nsswitch.conf(5) and/or resolv.conf(5), but note that changing these files will change the behavior of all other programs running on the same operating system. Though t

dns.lookup()

dns.lookup(hostname[, options], callback) Resolves a hostname (e.g. 'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IPv4 and IPv6 addresses are both valid. If options is an integer, then it must be 4 or 6. Alternatively, options can be an object containing these properties: family {Number} - The record family. If present, must be the integer 4 or 6. If not provided, both IP v4 and v6 addresses are accept

dns.getServers()

dns.getServers() Returns an array of IP address strings that are being used for name resolution.

disconnect event (Worker)

Event: 'disconnect' Similar to the cluster.on('disconnect') event, but specific to this worker. cluster.fork().on('disconnect', () => { // Worker has disconnected });

disconnect event (Cluster)

Event: 'disconnect' worker <cluster.Worker> Emitted after the worker IPC channel has disconnected. This can occur when a worker exits gracefully, is killed, or is disconnected manually (such as with worker.disconnect()). There may be a delay between the 'disconnect' and 'exit' events. These events can be used to detect if the process is stuck in a cleanup or if there are long-living connections. cluster.on('disconnect', (worker) => { console.log(`The worker #${worker.id} has di

disconnect event (ChildProcess)

Event: 'disconnect' The 'disconnect' event is emitted after calling the ChildProcess.disconnect() method in the parent or child process. After disconnecting it is no longer possible to send or receive messages, and the ChildProcess.connected property is false.

diffieHellman.verifyError

diffieHellman.verifyError A bit field containing any warnings and/or errors resulting from a check performed during initialization of the DiffieHellman object. The following values are valid for this property (as defined in constants module): DH_CHECK_P_NOT_SAFE_PRIME DH_CHECK_P_NOT_PRIME DH_UNABLE_TO_CHECK_GENERATOR DH_NOT_SUITABLE_GENERATOR

diffieHellman.setPublicKey()

diffieHellman.setPublicKey(public_key[, encoding]) Sets the Diffie-Hellman public key. If the encoding argument is provided and is either 'binary', 'hex' or 'base64', public_key is expected to be a string. If no encoding is provided, public_key is expected to be a Buffer.

diffieHellman.setPrivateKey()

diffieHellman.setPrivateKey(private_key[, encoding]) Sets the Diffie-Hellman private key. If the encoding argument is provided and is either 'binary', 'hex', or 'base64', private_key is expected to be a string. If no encoding is provided, private_key is expected to be a Buffer.

diffieHellman.getPublicKey()

diffieHellman.getPublicKey([encoding]) Returns the Diffie-Hellman public key in the specified encoding, which can be 'binary', 'hex', or 'base64'. If encoding is provided a string is returned; otherwise a Buffer is returned.