I just created this simple program in nodejs, but i can't bind it to the 
ipv6 address of my NIC.

I read in the API docs the following: *localAddress: Local interface to 
bind for network connections.*

//------------------------ PROGRAM START ------------------

var http = require('http');

var options = {
hostname: 'www.whatismyipv6.com',
localAddress: '2a01:xxxx:xxxx:xxxx::2' //a real ipv6 address here
};

var req = http.request(options, function(res) {
res.on('data', function (chunk) {
console.log(chunk.toString());
});
});

req.on('error', function(e) {
console.log('ERROR: ' + e.message);
});

req.end();

//------------------------ PROGRAM END ------------------ 

But when i execute the program i get this (no errors are raised). Note the 
ipv4 address.

<head>
<title>WhatIsMyIPv6? (IPv4: xx.xx.xxx.xxx)</title>
<meta name="bitly-verification" content="984886d337a6"/>
</head>


It looks like nodejs is ignoring the localAddress and is binding directly 
to the ipv4 address.

# node --version
v0.8.0



-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to