Skip to main content
summaryrefslogtreecommitdiffstats
blob: 1a15f24e18eb6794315c883420b738cd45fa6692 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<h1>WebSocket Test</h1>

<script lang="javascript">
  alert("testing");
  
  var ws = new WebSocket("ws://localhost:8080/");
 
  ws.onopen = function(evt) 
  { 
    alert("Conn opened"); 
    ws.send("Hello World");
  }

  ws.onmessage = function(evt) { alert("onmessage: " + evt.data); }
  ws.onclose = function(evt) { alert("Conn closed"); }
 
</script>

Back to the top