message.httpVersion

message.httpVersion In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server. Probably either '1.1' or '1.0'. Also message.httpVersionMajor is the first integer and message.httpVersionMinor is the second.

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

message event (Worker)

Event: 'message' message <Object> Similar to the cluster.on('message') event, but specific to this worker. This event is the same as the one provided by child_process.fork(). In a worker you can also use process.on('message'). As an example, here is a cluster that keeps count of the number of requests in the master process using the message system: const cluster = require('cluster'); const http = require('http'); if (cluster.isMaster) { // Keep track of http requests var num

message event (Process)

Event: 'message' message <Object> a parsed JSON object or primitive value sendHandle <Handle object> a net.Socket or net.Server object, or undefined. Messages sent by ChildProcess.send() are obtained using the 'message' event on the child's process object.

message event (dgram.Socket)

Event: 'message' msg <Buffer> - The message rinfo <Object> - Remote address information The 'message' event is emitted when a new datagram is available on a socket. The event handler function is passed two arguments: msg and rinfo. The msg argument is a Buffer and rinfo is an object with the sender's address information provided by the address, family and port properties: socket.on('message', (msg, rinfo) => { console.log('Received %d bytes from %s:%d\n', msg

message event (Cluster)

Event: 'message' worker <cluster.Worker> message <Object> Emitted when any worker receives a message. See child_process event: 'message'.

message event (ChildProcess)

Event: 'message' message <Object> a parsed JSON object or primitive value. sendHandle <Handle> a net.Socket or net.Server object, or undefined. The 'message' event is triggered when a child process uses process.send() to send messages.

listening event (Worker)

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

listening event (net.Server)

Event: 'listening' Emitted when the server has been bound after calling server.listen.

lookup event (net.Socket)

Event: 'lookup' Emitted after resolving the hostname but before connecting. Not applicable to UNIX sockets. err {Error|Null} The error object. See dns.lookup(). address {String} The IP address. family {String|Null} The address type. See dns.lookup(). host {String} The hostname.