einaros/ws — pull request #6 by kazuyukitanimura (2011-12-28 02:20:06+00:00)
Title: wss (ssl) support

This patch allows users to use ws on ssl. Thanks

Client
var WebSocket = require('ws');
var ws = new WebSocket('wss://www.host.com/path');
=======

Server
var options = {
key: fs.readFileSync('server.key'),
cert: fs.readFileSync('server.cert')
};
var app = require('https').createServer(options);
app.listen(8082);
var WebSocketServer = require('ws').Server;
var wsServer = new WebSocketServer({server: app});