On Fri, Mar 30, 2012 at 14:28, Masiar <[email protected]> wrote:
> Just tried. It seems like it doesn't even start the connection (I'm
> trying to connect it to another nodejs server, and the other server is
> not logging any connection to it). This is the code:
>
>        var options = {
>            some: 'option',
>        };
>
>        var req = http.request(options, function(res) {
>                res.setEncoding('utf8');
>
>                res.on('data', function (chunk) {
>                        //do something with chunk
>                });
>        });
>
>        req.on('error', function(e) {
>                console.log('problem with request: ' + e.message);
>        });
>
>        req.setTimeout(SOCKET_TIMEOUT, function(socket){});
>
>        req.write('data\n');
>        req.end();
>
> Is there something wrong?

I don't see anything obviously wrong. What does `NODE_DEBUG="net http"
node script.js` print? .setTimeout() doesn't take a callback by the
way.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to