Added listening to specific net. interfaces
authorDarren <darren@darrenwhitlen.com>
Sat, 24 Sep 2011 22:16:45 +0000 (23:16 +0100)
committerDarren <darren@darrenwhitlen.com>
Sat, 24 Sep 2011 22:16:45 +0000 (23:16 +0100)
node/app.js

index 7f0dec0116e1a633a628748c0212724d2a3fb04f..b8cae0b0aabbd105db6a8daeca8b240c57934295 100644 (file)
@@ -668,12 +668,12 @@ this.websocketListen = function (ports, host, handler, key, cert) {
         if (port.secure === true) {
             hs = https.createServer({key: fs.readFileSync(__dirname + '/' + key), cert: fs.readFileSync(__dirname + '/' + cert)}, handler);
             kiwi.io.push(ws.listen(hs, {secure: true}));
-            hs.listen(port.number);
+            hs.listen(port.number, host);
             console.log("Listening on %s:%d with SSL", host, port.number);
         } else {
             hs = http.createServer(handler);
             kiwi.io.push(ws.listen(hs, {secure: false}));
-            hs.listen(port.number);
+            hs.listen(port.number, host);
             console.log("Listening on %s:%d without SSL", host, port.number);
         }
     });