Created
October 15, 2015 13:06
-
-
Save rom1504/b96629cc65d55d2b639b to your computer and use it in GitHub Desktop.
bind given ipv6
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 characters
| var http = require('http'); | |
| var options = { | |
| hostname: 'www.whatismyipv6.com', | |
| localAddress: process.argv[2], | |
| family:6 | |
| }; | |
| 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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment