blob: 8a9ae9c523acafb0d252ad870e26f5ee19d7f647 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<html>
<head>
<script type="text/javascript">
var webSocket = null;
function openSocket(){
webSocket = new WebSocket("ws://localhost:8001/foo/bar");
webSocket.onclose = openSocket;
}
function init(){
openSocket();
setInterval(function(){webSocket.send("foo");}, 1000);
}
</script>
</head>
<body onload="init();">
</body>
</html>
|