var websocket = require('websocket');
server.websocket = new websocket.server({ httpServer: server, autoAcceptConnections: false });
server.websocket.on('request', function(socket) {
var req = socket.httpRequest;
var res = socket.socket;
});
console.dir(Object.keys(socket));