-
-
Save wsdookadr/715787 to your computer and use it in GitHub Desktop.
Revisions
-
isaacs created this gist
Nov 25, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ var http = require("http") http.createServer(function (req, res) { // let it time out // just hold the connection open forever }).listen(8080) var r = http.createClient(8080, "localhost").request("GET", "/", {}) r.on("response", function (res) { console.log("got response") }) r.connection.setTimeout(100) r.connection.on("timeout", function () { console.log("timeout!") }) r.end()