secure event (SecurePair)

Event: 'secure' This event is emitted from the SecurePair once the pair has successfully established a secure connection. As with checking for the server secureConnection event, pair.cleartext.authorized should be inspected to confirm whether the certificate used is properly authorized.

path.normalize()

path.normalize(p) Normalize a string path, taking care of '..' and '.' parts. When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. Example: path.normalize('/foo/bar//baz/asdf/quux/..') // returns '/foo/bar/baz/asdf' Note: If the path string passed as argument is a zero-length string then '.' will be returned, which represents the current working directory.

module.filename

module.filename <String> The fully resolved filename to the module.

cluster.setupMaster()

cluster.setupMaster([settings]) settings <Object> exec <String> file path to worker file. (Default=process.argv[1]) args <Array> string arguments passed to worker. (Default=process.argv.slice(2)) silent <Boolean> whether or not to send output to parent's stdio. (Default=false) setupMaster is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings. Note that: any settings changes only affect future calls to .fork()

secureConnection event (tls.Server)

Event: 'secureConnection' function (tlsSocket) {} This event is emitted after the handshaking process for a new connection has successfully completed. The argument is an instance of tls.TLSSocket and has all the common stream methods and events. socket.authorized is a boolean value which indicates if the client has been verified by one of the supplied certificate authorities for the server. If socket.authorized is false, then socket.authorizationError is set to describe how authorization fail

process.nextTick()

process.nextTick(callback[, arg][, ...]) callback <Function> Once the current event loop turn runs to completion, call the callback function. This is not a simple alias to setTimeout(fn, 0), it's much more efficient. It runs before any additional I/O events (including timers) fire in subsequent ticks of the event loop. console.log('start'); process.nextTick(() => { console.log('nextTick callback'); }); console.log('scheduled'); // Output: // start // scheduled // nextTick callb

clientError event (tls.Server)

Event: 'clientError' function (exception, tlsSocket) { } When a client connection emits an 'error' event before a secure connection is established it will be forwarded here. tlsSocket is the tls.TLSSocket that the error originated from.

tlsSocket.getProtocol()

tlsSocket.getProtocol() Returns a string containing the negotiated SSL/TLS protocol version of the current connection. 'unknown' will be returned for connected sockets that have not completed the handshaking process. null will be returned for server sockets or disconnected client sockets. Examples: 'SSLv3' 'TLSv1' 'TLSv1.1' 'TLSv1.2' 'unknown' See https://www.openssl.org/docs/manmaster/ssl/SSL_get_version.html for more information.

domain.bind()

domain.bind(callback) callback <Function> The callback function return: <Function> The bound function The returned function will be a wrapper around the supplied callback function. When the returned function is called, any errors that are thrown will be routed to the domain's 'error' event. Example const d = domain.create(); function readSomeFile(filename, cb) { fs.readFile(filename, 'utf8', d.bind((er, data) => { // if this throws, it will also be passed to the domain

domain.remove()

domain.remove(emitter) emitter <EventEmitter> | <Timer> emitter or timer to be removed from the domain The opposite of domain.add(emitter). Removes domain handling from the specified emitter.