SlowBuffer

Class: SlowBuffer Returns an un-pooled Buffer. In order to avoid the garbage collection overhead of creating many individually allocated Buffers, by default allocations under 4KB are sliced from a single larger allocated object. This approach improves both performance and memory usage since v8 does not need to track and cleanup as many Persistent objects. In the case where a developer may need to retain a small chunk of memory from a pool for an indeterminate amount of time, it may be appropr

childprocess.disconnect()

child.disconnect() Closes the IPC channel between parent and child, allowing the child to exit gracefully once there are no other connections keeping it alive. After calling this method the child.connected and process.connected properties in both the parent and child (respectively) will be set to false, and it will be no longer possible to pass messages between the processes. The 'disconnect' event will be emitted when there are no messages in the process of being received. This will most ofte

cipher.setAAD()

cipher.setAAD(buffer) When using an authenticated encryption mode (only GCM is currently supported), the cipher.setAAD() method sets the value used for the additional authenticated data (AAD) input parameter.

worker.suicide

worker.suicide <Boolean> Set by calling .kill() or .disconnect(), until then it is undefined. The boolean worker.suicide lets you distinguish between voluntary and accidental exit, the master may choose not to respawn a worker based on this value. cluster.on('exit', (worker, code, signal) => { if (worker.suicide === true) { console.log('Oh, it was just suicide\' – no need to worry'). } }); // kill worker worker.kill();

cluster.disconnect()

cluster.disconnect([callback]) callback <Function> called when all workers are disconnected and handles are closed Calls .disconnect() on each worker in cluster.workers. When they are disconnected all internal handles will be closed, allowing the master process to die gracefully if no other event is waiting. The method takes an optional callback argument which will be called when finished. This can only be called from the master process.

Hmac

Class: Hmac The Hmac Class is a utility for creating cryptographic HMAC digests. It can be used in one of two ways: As a stream that is both readable and writable, where data is written to produce a computed HMAC digest on the readable side, or Using the hmac.update() and hmac.digest() methods to produce the computed HMAC digest. The crypto.createHmac() method is used to create Hmac instances. Hmac objects are not to be created directly using the new keyword. Example: Using Hmac objects as

cipher.final()

cipher.final([output_encoding]) Returns any remaining enciphered contents. If output_encoding parameter is one of 'binary', 'base64' or 'hex', a string is returned. If an output_encoding is not provided, a Buffer is returned. Once the cipher.final() method has been called, the Cipher object can no longer be used to encrypt data. Attempts to call cipher.final() more than once will result in an error being thrown.

net_socket.setNoDelay()

socket.setNoDelay([noDelay]) Disables the Nagle algorithm. By default TCP connections use the Nagle algorithm, they buffer data before sending it off. Setting true for noDelay will immediately fire off data each time socket.write() is called. noDelay defaults to true. Returns socket.

net_socket.write()

socket.write(data[, encoding][, callback]) Sends data on the socket. The second parameter specifies the encoding in the case of a string--it defaults to UTF8 encoding. Returns true if the entire data was flushed successfully to the kernel buffer. Returns false if all or part of the data was queued in user memory. 'drain' will be emitted when the buffer is again free. The optional callback parameter will be executed when the data is finally written out - this may not be immediately.

message.headers

message.headers The request/response headers object. Key-value pairs of header names and values. Header names are lower-cased. Example: // Prints something like: // // { 'user-agent': 'curl/7.22.0', // host: '127.0.0.1:8000', // accept: '*/*' } console.log(request.headers); Duplicates in raw headers are handled in the following ways, depending on the header name: Duplicates of age, authorization, content-length, content-type, etag, expires, from, host, if-modified-since, if-unmodified-si