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 3838 * holder.
3939 */
4040
41- //var wsUri = "ws://u1:p1@" + document.location.host + document.location.pathname + "websocket";
42-
43-
4441function echo ( ) {
42+ // var wsUri = "ws://u1:p1@" + document.location.host + document.location.pathname + "websocket";
4543 var wsUri = "ws://" + document . location . host + document . location . pathname + "websocket" ;
4644 console . log ( "Connecting to " + wsUri ) ;
4745 var websocket = new WebSocket ( wsUri ) ;
@@ -50,24 +48,8 @@ function echo() {
5048 writeToScreen ( "SENT: " + myField . value ) ;
5149 } ;
5250 websocket . onmessage = function ( evt ) { writeToScreen ( "RECEIVED: " + evt . data ) ; } ;
53- // websocket.onerror = function(evt) { onError(evt) };
54-
55-
5651}
5752
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-
7153function writeToScreen ( message ) {
7254 var output = document . getElementById ( "output" ) ;
7355 var pre = document . createElement ( "p" ) ;
You can’t perform that action at this time.
0 commit comments