writeStream.bytesWritten

writeStream.bytesWritten The number of bytes written so far. Does not include data that is still queued for writing.

eventemitter.setMaxListeners()

emitter.setMaxListeners(n) By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. Obviously, not all events should be limited to just 10 listeners. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) for to indicate an unlimited number of listeners. Returns a reference to the EventEmitter s

os.type()

os.type() Returns the operating system name. For example 'Linux' on Linux, 'Darwin' on OS X and 'Windows_NT' on Windows.

WriteStream

Class: WriteStream A net.Socket subclass that represents the writable portion of a tty. In normal circumstances, process.stdout will be the only tty.WriteStream instance ever created (and only when isatty(1) is true).

Buffer.alloc()

Class Method: Buffer.alloc(size[, fill[, encoding]]) size <Number> fill <Value> Default: undefined encoding <String> Default: utf8 Allocates a new Buffer of size bytes. If fill is undefined, the Buffer will be zero-filled. const buf = Buffer.alloc(5); console.log(buf); // <Buffer 00 00 00 00 00> The size must be less than or equal to the value of require('buffer').kMaxLength (on 64-bit architectures, kMaxLength is (2^31)-1). Otherwise, a RangeError is thrown.

connection event (http.Server)

Event: 'connection' function (socket) { } When a new TCP stream is established. socket is an object of type net.Socket. Usually users will not want to access this event. In particular, the socket will not emit 'readable' events because of how the protocol parser attaches to the socket. The socket can also be accessed at request.connection.

net_socket.resume()

socket.resume() Resumes reading after a call to pause().

process.exitCode

process.exitCode A number which will be the process exit code, when the process either exits gracefully, or is exited via process.exit() without specifying a code. Specifying a code to process.exit(code) will override any previous setting of process.exitCode.

end event (stream.Readable)

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

clearTimeout()

clearTimeout(timeoutObject) Prevents a timeoutObject, as created by setTimeout, from triggering.