File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed
websocket/endpoint-security/src/main/webapp Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change 38
38
* holder.
39
39
*/
40
40
41
- //var wsUri = "ws://u1:p1@" + document.location.host + document.location.pathname + "websocket";
42
-
43
-
44
41
function echo ( ) {
42
+ // var wsUri = "ws://u1:p1@" + document.location.host + document.location.pathname + "websocket";
45
43
var wsUri = "ws://" + document . location . host + document . location . pathname + "websocket" ;
46
44
console . log ( "Connecting to " + wsUri ) ;
47
45
var websocket = new WebSocket ( wsUri ) ;
@@ -50,24 +48,8 @@ function echo() {
50
48
writeToScreen ( "SENT: " + myField . value ) ;
51
49
} ;
52
50
websocket . onmessage = function ( evt ) { writeToScreen ( "RECEIVED: " + evt . data ) ; } ;
53
- // websocket.onerror = function(evt) { onError(evt) };
54
-
55
-
56
51
}
57
52
58
- //function onOpen() {
59
- // console.log("onOpen");
60
- // writeToScreen("CONNECTED");
61
- //}
62
- //
63
- //function onMessage(evt) {
64
- // writeToScreen("RECEIVED: " + evt.data);
65
- //}
66
- //
67
- //function onError(evt) {
68
- // writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
69
- //}
70
-
71
53
function writeToScreen ( message ) {
72
54
var output = document . getElementById ( "output" ) ;
73
55
var pre = document . createElement ( "p" ) ;
You can’t perform that action at this time.
0 commit comments