net_socket.setNoDelay()

socket.setNoDelay([noDelay]) Disables the Nagle algorithm. By default TCP connections use the Nagle algorithm, they buffer data before sending it off. Setting true for noDelay will immediately fire off data each time socket.write() is called. noDelay defaults to true. Returns socket.

readable.pipe()

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

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.

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

http.ClientRequest

Class: http.ClientRequest This object is created internally and returned from http.request(). It represents an in-progress request whose header has already been queued. The header is still mutable using the setHeader(name, value), getHeader(name), removeHeader(name) API. The actual header will be sent along with the first data chunk or when closing the connection. To get the response, add a listener for 'response' to the request object. 'response' will be emitted from the request object when t

error event (dgram.Socket)

Event: 'error' exception <Error> The 'error' event is emitted whenever any error occurs. The event handler function is passed a single Error object.

http_server.setTimeout()

server.setTimeout(msecs, callback) msecs <Number> callback <Function> Sets the timeout value for sockets, and emits a 'timeout' event on the Server object, passing the socket as an argument, if a timeout occurs. If there is a 'timeout' event listener on the Server object, then it will be called with the timed-out socket as an argument. By default, the Server's timeout value is 2 minutes, and sockets are destroyed automatically if they time out. However, if you assign a callb

agent.maxSockets

agent.maxSockets By default set to Infinity. Determines how many concurrent sockets the agent can have open per origin. Origin is either a 'host:port' or 'host:port:localAddress' combination.

net.createServer()

net.createServer([options][, connectionListener]) Creates a new server. The connectionListener argument is automatically set as a listener for the 'connection' event. options is an object with the following defaults: { allowHalfOpen: false, pauseOnConnect: false } If allowHalfOpen is true, then the socket won't automatically send a FIN packet when the other end of the socket sends a FIN packet. The socket becomes non-readable, but still writable. You should call the end() method explicitl

fs.writeSync()

fs.writeSync(fd, buffer, offset, length[, position])