Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
base: db5d58e84252
Choose a base ref
...
head repository: nodejs/node-v0.x-archive
compare: d258fb021253
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Mar 6, 2013

  1. http: More useful setTimeout API on server

    This adds the following to HTTP:
    
    * server.setTimeout(msecs, callback)
      Sets all new connections to time out after the specified time, at
      which point it emits 'timeout' on the server, passing the socket as an
      argument.
      In this way, timeouts can be handled in one place consistently.
    * req.setTimeout(), res.setTimeout()
      Essentially an alias to req/res.socket.setTimeout(), but without
      having to delve into a "buried" object.  Adds a listener on the
      req/res object, but not on the socket.
    * server.timeout
      Number of milliseconds before incoming connections time out.
      (Default=1000*60*2, as before.)
    
    Furthermore, if the user sets up their own timeout listener on either
    the server, the request, or the response, then the default behavior
    (destroying the socket) is suppressed.
    
    Fix #3460
    isaacs committed Mar 6, 2013
    1
    Copy the full SHA
    d258fb0 View commit details
    Browse the repository at this point in the history