dgram.createSocket()

dgram.createSocket(options[, callback]) options <Object> callback <Function> Attached as a listener to 'message' events. Returns: <dgram.Socket> Creates a dgram.Socket object. The options argument is an object that should contain a type field of either udp4 or udp6 and an optional boolean reuseAddr field. When reuseAddr is true socket.bind() will reuse the address, even if another process has already bound a socket on it. reuseAddr defaults to false. An optional callbac

newListener event (EventEmitter)

Event: 'newListener' eventName <String> | <Symbol> The name of the event being listened for listener <Function> The event handler function The EventEmitter instance will emit it's own 'newListener' event before a listener is added to it's internal array of listeners. Listeners registered for the 'newListener' event will be passed the event name and a reference to the listener being added. The fact that the event is triggered before adding the listener has a subtle but im

buffer.entries()

buf.entries() Return: <Iterator> Creates and returns an iterator of [index, byte] pairs from the Buffer contents. const buf = Buffer.from('buffer'); for (var pair of buf.entries()) { console.log(pair); } // prints: // [0, 98] // [1, 117] // [2, 102] // [3, 102] // [4, 101] // [5, 114]

dns.lookupService()

dns.lookupService(address, port, callback) Resolves the given address and port into a hostname and service using the operating system's underlying getnameinfo implementation. The callback has arguments (err, hostname, service). The hostname and service arguments are strings (e.g. 'localhost' and 'http' respectively). On error, err is an Error object, where err.code is the error code. const dns = require('dns'); dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { console.log

zlib.inflateRawSync()

zlib.inflateRawSync(buf[, options]) Decompress a Buffer or string with InflateRaw.

dgram_socket.bind()

socket.bind([port][, address][, callback]) port <Number> - Integer, Optional address <String>, Optional callback <Function> with no parameters, Optional. Called when binding is complete. For UDP sockets, causes the dgram.Socket to listen for datagram messages on a named port and optional address. If port is not specified, the operating system will attempt to bind to a random port. If address is not specified, the operating system will attempt to listen on all addresses. O

childprocess.stdin

child.stdin <Stream> A Writable Stream that represents the child process's stdin. Note that if a child process waits to read all of its input, the child will not continue until this stream has been closed via end(). If the child was spawned with stdio[0] set to anything other than 'pipe', then this will be undefined. child.stdin is an alias for child.stdio[0]. Both properties will refer to the same value.

Cipher

Class: Cipher Instances of the Cipher class are used to encrypt data. The class can be used in one of two ways: As a stream that is both readable and writable, where plain unencrypted data is written to produce encrypted data on the readable side, or Using the cipher.update() and cipher.final() methods to produce the encrypted data. The crypto.createCipher() or crypto.createCipheriv() methods are used to create Cipher instances. Cipher objects are not to be created directly using the new key

crypto.privateEncrypt()

crypto.privateEncrypt(private_key, buffer) Encrypts buffer with private_key. private_key can be an object or a string. If private_key is a string, it is treated as the key with no passphrase and will use RSA_PKCS1_PADDING. If private_key is an object, it is interpreted as a hash object with the keys: key : {String} - PEM encoded private key passphrase : {String} - Optional passphrase for the private key padding : An optional padding value, one of the following:constants.RSA_NO_PADDING cons

crypto.publicEncrypt()

crypto.publicEncrypt(public_key, buffer) Encrypts buffer with public_key. public_key can be an object or a string. If public_key is a string, it is treated as the key with no passphrase and will use RSA_PKCS1_OAEP_PADDING. If public_key is an object, it is interpreted as a hash object with the keys: key : {String} - PEM encoded public key passphrase : {String} - Optional passphrase for the private key padding : An optional padding value, one of the following:constants.RSA_NO_PADDING consta