<!DOCTYPE html>


<html>

<head>
<script>

if ("WebSocket" in window) {
   var ws = new WebSocket("ws://localhost:9123/"); 
  ws.onopen = function() {
  	ws.send("message to send");
  };
  ws.onmessage = function (evt) {
  	alert(evt.data);
  };
  ws.onclose = function() {
  	alert("closed");
  };
}
else {
	alert("the browser doesn't support WebSocket.");
}
</script>
</head>
<body>
hello
</body>
</html>
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2010-09-27 09:43:31
Processing time 0.0049 sec