online event (Worker)

Event: 'online' Similar to the cluster.on('online') event, but specific to this worker. cluster.fork().on('online', () => { // Worker is online }); It is not emitted in the worker.

online event (Cluster)

Event: 'online' worker <cluster.Worker> After forking a new worker, the worker should respond with an online message. When the master receives an online message it will emit this event. The difference between 'fork' and 'online' is that fork is emitted when the master forks a worker, and 'online' is emitted when the worker is running. cluster.on('online', (worker) => { console.log('Yay, the worker responded after it was forked'); });

OCSPRequest event (tls.Server)

Event: 'OCSPRequest' function (certificate, issuer, callback) { } Emitted when the client sends a certificate status request. The server's current certificate can be parsed to obtain the OCSP URL and certificate ID; after obtaining an OCSP response callback(null, resp) is then invoked, where resp is a Buffer instance. Both certificate and issuer are Buffer DER-representations of the primary and issuer's certificates. They can be used to obtain the OCSP certificate ID and OCSP endpoint URL. Al

OCSPResponse event (tls.TLSSocket)

Event: 'OCSPResponse' function (response) { } This event will be emitted if the requestOCSP option was set. response is a Buffer containing the server's OCSP response. Traditionally, the response is a signed object from the server's CA that contains information about server's certificate revocation status.

newSession event (tls.Server)

Event: 'newSession' function (sessionId, sessionData, callback) { } Emitted on creation of a TLS session. May be used to store sessions in external storage. callback must be invoked eventually, otherwise no data will be sent or received from the secure connection. NOTE: adding this event listener will only have an effect on connections established after the addition of the event listener.

newListener event (EventEmitter)

Event: 'newListener' eventName <String> | <Symbol> The name of the event being listened for listener <Function> The event handler function The EventEmitter instance will emit it's own 'newListener' event before a listener is added to it's internal array of listeners. Listeners registered for the 'newListener' event will be passed the event name and a reference to the listener being added. The fact that the event is triggered before adding the listener has a subtle but im

net_socket.setTimeout()

socket.setTimeout(timeout[, callback]) Sets the socket to timeout after timeout milliseconds of inactivity on the socket. By default net.Socket do not have a timeout. When an idle timeout is triggered the socket will receive a 'timeout' event but the connection will not be severed. The user must manually end() or destroy() the socket. If timeout is 0, then the existing idle timeout is disabled. The optional callback parameter will be added as a one time listener for the 'timeout' event. Ret

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.

net_socket.unref()

socket.unref() Calling unref on a socket will allow the program to exit if this is the only active socket in the event system. If the socket is already unrefd calling unref again will have no effect. Returns socket.

net_socket.resume()

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