We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e64b747 commit aa58feaCopy full SHA for aa58fea
websocket/chat/src/main/webapp/websocket.js
@@ -38,7 +38,7 @@
38
* holder.
39
*/
40
41
-var wsUri = "ws://" + document.location.host + document.location.pathname + "websocket";
+var wsUri = "ws://" + document.location.host + document.location.pathname + "chat";
42
var websocket = new WebSocket(wsUri);
43
44
var username;
@@ -61,8 +61,7 @@ function onOpen() {
61
}
62
63
function onMessage(evt) {
64
- console.log("onMessage");
65
- writeToScreen("RECEIVED: " + evt.data);
+ console.log("onMessage: " + evt.data);
66
if (evt.data.indexOf("joined") != -1) {
67
userField.innerHTML += evt.data.substring(0, evt.data.indexOf(" joined")) + "\n";
68
} else {
0 commit comments