-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.html
More file actions
37 lines (27 loc) · 831 Bytes
/
client.html
File metadata and controls
37 lines (27 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE HTML>
<html>
<head>
<title>WebSocket Test</title>
<!-- ReSharper disable Html.EventNotResolved -->
<script type="text/javascript" src="imasiws.js"></script>
<script type="text/javascript">
var imasiWs = new ImasiSoftware.WebSocketClient();
imasiWs.onConnect = function(){
alert("Connected");
imasiWs.send("Hi", "Working");
}
imasiWs.onMessage = function (key, value) {
alert("Received: {" + key + "} " + value);
}
imasiWs.addEventListener('KEY', function(data) {
alert('Event KEY received with data: ' + data);
imasiWs.send('YES!', "4chaaan.org XD");
imasiWs.send('Prueba', "Hola que tal");
});
imasiWs.connect("localhost", 80);
</script>
</head>
<body>
Refresh 4 fun
</body>
</html>