Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
* missed one refactor in test/manual_test.html
* an update in npm-ws broke examples/example_websockets_nodejs_server_echo.js
  • Loading branch information
dennisguse committed Aug 3, 2017
1 parent eaadf5d commit b883a79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/example_websockets_nodejs_server_echo.js
Expand Up @@ -27,13 +27,13 @@ var wss = new(require('ws')).Server({
console.log("Server listening on port " + wss.options["port"]); console.log("Server listening on port " + wss.options["port"]);
console.log("==============================================="); console.log("===============================================");


wss.on('connection', function(ws) { wss.on('connection', function(ws, req) {
ws.origin = ws.upgradeReq.headers['sec-websocket-key']; ws.origin = req.headers['sec-websocket-key']


console.log("The client " + ws.origin + " has just connected. "); console.log("The client " + ws.origin + " has just connected. ");


ws.on('message', function(msg) { ws.on('message', function(msg) {
console.log("User '" + ws.origin + "' sent the message '" + msg + "'"); console.log("The client '" + ws.origin + "' sent the message '" + msg + "'");
setTimeout(function() { setTimeout(function() {
ws.send(msg) ws.send(msg)
}.bind(this), 2500); }.bind(this), 2500);
Expand Down
2 changes: 1 addition & 1 deletion tests/manual_test.html
Expand Up @@ -59,7 +59,7 @@


new QuestionnaireItemWrite("write-border", "QuestionnaireItemWrite: please draw something and use the razor to erase it.", false), new QuestionnaireItemWrite("write-border", "QuestionnaireItemWrite: please draw something and use the razor to erase it.", false),


new QuestionnaireItemQuality7pt(undefined, "QuestionnaireItemQuality7pt: please select 'ausgezeichnet',", false) new QuestionnaireItemSVGQuality7pt(undefined, "QuestionnaireItemSVGQuality7pt: please select 'ausgezeichnet',", false)
); );
screens.push(screen2); screens.push(screen2);


Expand Down

0 comments on commit b883a79

Please sign in to comment.