Skip to content

Instantly share code, notes, and snippets.

@wemakeweb
Created June 24, 2011 12:16
Show Gist options
  • Save wemakeweb/1044661 to your computer and use it in GitHub Desktop.
Save wemakeweb/1044661 to your computer and use it in GitHub Desktop.
var fs = require('fs'),
tls = require('tls'),
net = require('net'),
server = {
key: fs.readFileSync('../server-key.pem'),
cert: fs.readFileSync('../server-cert.pem'),
},
socket;
try {
socket = tls.connect(8000, '127.0.0.1', server);
socket.on('error', function(err){
console.log('this never calls on windows');
console.log(err.message);
});
} catch(err){
console.log('this also never calls on windows');
console.log(err.message);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment