fork event (Cluster)

Event: 'fork' worker <cluster.Worker> When a new worker is forked the cluster module will emit a 'fork' event. This can be used to log worker activity, and create your own timeout. var timeouts = []; function errorMsg() { console.error('Something must be wrong with the connection ...'); } cluster.on('fork', (worker) => { timeouts[worker.id] = setTimeout(errorMsg, 2000); }); cluster.on('listening', (worker, address) => { clearTimeout(timeouts[worker.id]); }); cluster.on('

message event (Cluster)

Event: 'message' worker <cluster.Worker> message <Object> Emitted when any worker receives a message. See child_process event: 'message'.

request.flushHeaders()

request.flushHeaders() Flush the request headers. For efficiency reasons, Node.js normally buffers the request headers until you call request.end() or write the first chunk of request data. It then tries hard to pack the request headers and data into a single TCP packet. That's usually what you want (it saves a TCP round-trip) but not when the first data isn't sent until possibly much later. request.flushHeaders() lets you bypass the optimization and kickstart the request.

transform._transform()

Stability: 2 - Stable A stream is an abstract interface implemented by various objects in Node.js. For example a request to an HTTP server is a stream, as is process.stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter. You can load the Stream base classes by doing require('stream'). There are base classes provided for Readable streams, Writable streams, Duplex streams, and Transform streams. This document is split up into 3 sections: The first section e

path.basename()

path.basename(p[, ext]) Return the last portion of a path. Similar to the Unix basename command. Example: path.basename('/foo/bar/baz/asdf/quux.html') // returns 'quux.html' path.basename('/foo/bar/baz/asdf/quux.html', '.html') // returns 'quux'

fs.chownSync()

fs.chownSync(path, uid, gid) Synchronous chown(2). Returns undefined.

tlsSocket.authorized

tlsSocket.authorized A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false.

dgram_socket.ref()

socket.ref() By default, binding a socket will cause it to block the Node.js process from exiting as long as the socket is open. The socket.unref() method can be used to exclude the socket from the reference counting that keeps the Node.js process active. The socket.ref() method adds the socket back to the reference counting and restores the default behavior. Calling socket.ref() multiples times will have no additional effect. The socket.ref() method returns a reference to the socket so calls

net_socket.remoteFamily

socket.remoteFamily The string representation of the remote IP family. 'IPv4' or 'IPv6'.

buffer.readFloatLE()

buf.readFloatLE(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 4 noAssert <Boolean> Default: false Return: <Number> Reads a 32-bit float from the Buffer at the specified offset with specified endian format (readFloatBE() returns big endian, readFloatLE() returns little endian). Setting noAssert to true skips validation of the offset. This allows the offset to be beyond the end of the Buffer. const buf = Buffer.from([1,2,3,4]); buf.readFloatBE();