summaryrefslogtreecommitdiffstats
path: root/net/data/websocket/counted_connection.html
blob: bb53ec1fa925b07486e3c8d268bf6b4004f1d4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!doctype html>
<html>
<head>
<title>Connect to a WebSocket server</title>
<script type="text/javascript">
var protocol = location.protocol.replace('http', 'ws');
var url = protocol + '//' + location.host + '/count-connection';
var ws = new WebSocket(url);

ws.onopen = function() {
    document.title = 'CONNECTED';
};

ws.onclose = function() {
    document.title = 'CLOSED';
};
</script>
</head>
</html>