Skip to content
Permalink
Browse files

Bugfix

* 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 b883a790163947f6fc1fa51fe0d178629f83947b
Showing with 4 additions and 4 deletions.
  1. +3 −3 examples/example_websockets_nodejs_server_echo.js
  2. +1 −1 tests/manual_test.html
@@ -27,13 +27,13 @@ var wss = new(require('ws')).Server({
console.log("Server listening on port " + wss.options["port"]);
console.log("===============================================");

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

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

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() {
ws.send(msg)
}.bind(this), 2500);
@@ -59,7 +59,7 @@
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);

0 comments on commit b883a79

Please sign in to comment.
You can’t perform that action at this time.