SIGINT event (Readline)

Event: 'SIGINT' function () {} Emitted whenever the input stream receives a ^C, respectively known as SIGINT. If there is no SIGINT event listener present when the input stream receives a SIGINT, pause will be triggered. Example of listening for SIGINT: rl.on('SIGINT', () => { rl.question('Are you sure you want to exit?', (answer) => { if (answer.match(/^y(es)?$/i)) rl.pause(); }); });

SIGCONT event (Readline)

Event: 'SIGCONT' function () {} This does not work on Windows. Emitted whenever the input stream is sent to the background with ^Z, respectively known as SIGTSTP, and then continued with fg(1). This event only emits if the stream was not paused before sending the program to the background. Example of listening for SIGCONT: rl.on('SIGCONT', () => { // `prompt` will automatically resume the stream rl.prompt(); });

setup event (Cluster)

Event: 'setup' settings <Object> Emitted every time .setupMaster() is called. The settings object is the cluster.settings object at the time .setupMaster() was called and is advisory only, since multiple calls to .setupMaster() can be made in a single tick. If accuracy is important, use cluster.settings.

setTimeout()

setTimeout(callback, delay[, arg][, ...]) Schedules execution of a one-time callback after delay milliseconds. Returns a timeoutObject for possible use with clearTimeout. Additional optional arguments may be passed to the callback. The callback will likely not be invoked in precisely delay milliseconds. Node.js makes no guarantees about the exact timing of when callbacks will fire, nor of their ordering. The callback will be called as close as possible to the time specified. To follow browser

setInterval()

setInterval(callback, delay[, arg][, ...]) Schedules repeated execution of callback every delay milliseconds. Returns a intervalObject for possible use with clearInterval. Additional optional arguments may be passed to the callback. To follow browser behavior, when using delays larger than 2147483647 milliseconds (approximately 25 days) or less than 1, Node.js will use 1 as the delay.

setImmediate()

setImmediate(callback[, arg][, ...]) Schedules "immediate" execution of callback after I/O events' callbacks and before timers set by setTimeout and setInterval are triggered. Returns an immediateObject for possible use with clearImmediate. Additional optional arguments may be passed to the callback. Callbacks for immediates are queued in the order in which they were created. The entire callback queue is processed every event loop iteration. If an immediate is queued from inside an executing c

setFlagsFromString()

setFlagsFromString(string) Set additional V8 command line flags. Use with care; changing settings after the VM has started may result in unpredictable behavior, including crashes and data loss. Or it may simply do nothing. The V8 options available for a version of Node.js may be determined by running node --v8-options. An unofficial, community-maintained list of options and their effects is available here. Usage: // Print GC events to stdout for one minute. const v8 = require('v8'); v8.setFl

SecurePair

Class: SecurePair Returned by tls.createSecurePair.

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

secureConnect event (tls.TLSSocket)

Event: 'secureConnect' This event is emitted after the handshaking process for a new connection has successfully completed. The listener will be called regardless of whether or not the server's certificate has been authorized. It is the user's responsibility to test tlsSocket.authorized to see if the server certificate was signed by one of the specified CAs. If tlsSocket.authorized === false then the error can be found in tlsSocket.authorizationError. Also, if either ALPN or NPN was used tlsSoc