http,net,tls: return this from setTimeout methods
authorEvan Lucas <evanlucas@me.com>
Thu, 14 May 2015 02:25:57 +0000 (21:25 -0500)
committerRoman Reiss <me@silverwind.io>
Sat, 16 May 2015 05:17:41 +0000 (07:17 +0200)
commitd4726cde57856896c560820b89eae0bc08621034
tree01e5ec875240d6e0fb9a7b4e8cfba309dd271a44
parentc7fb91dc1310f9454d4aa8091bcc6d305322a72f
http,net,tls: return this from setTimeout methods

Modifies the setTimeout methods for the following prototypes:

- http.ClientRequest
- http.IncomingMessage
- http.OutgoingMessage
- http.Server
- https.Server
- net.Socket
- tls.TLSSocket

Previously, the above functions returned undefined. They now return
`this`. This is useful for chaining function calls.

PR-URL: https://github.com/nodejs/io.js/pull/1699
Reviewed-By: Roman Reiss <me@silverwind.io>
16 files changed:
doc/api/http.markdown
doc/api/net.markdown
lib/_http_client.js
lib/_http_incoming.js
lib/_http_outgoing.js
lib/_http_server.js
lib/net.js
test/parallel/test-http-client-timeout.js
test/parallel/test-http-set-timeout-server.js
test/parallel/test-http-set-timeout.js
test/parallel/test-https-set-timeout-server.js
test/parallel/test-https-timeout-server-2.js
test/parallel/test-net-settimeout.js
test/parallel/test-tls-request-timeout.js
test/parallel/test-tls-timeout-server-2.js
test/parallel/test-tls-wrap-timeout.js