18 lines
351 B
HTML
18 lines
351 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<script>
|
||
|
var ws = new WebSocket("wss://localhost:80/");
|
||
|
ws.onopen = function() {
|
||
|
function schedule(i) {
|
||
|
setTimeout(function() {
|
||
|
ws.send('Hello from the client! (iteration ' + i + ')');
|
||
|
schedule(i + 1);
|
||
|
}, 1000);
|
||
|
};
|
||
|
schedule(1);
|
||
|
};
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
</body>
|