-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsocket.html
More file actions
25 lines (25 loc) · 802 Bytes
/
socket.html
File metadata and controls
25 lines (25 loc) · 802 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
<!DOCTYPE html>
<html>
<head>
<title>Socket.IO Testing</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.js"></script>
</head>
<body>
<h1>Socket.IO Testing</h1>
<script>
var socket = io("http://localhost:8000", {query: "topicID=1&session=2bc0e2c3-d495-4b9e-97d2-880238322b96&salt=$2a$10$gBnC113pW.xdhtrmD87XHO"});
socket.on("connect", function() {
console.log("connected");
});
socket.on("event", function(data) {
console.log("event " + JSON.stringify(data));
});
socket.on("disconnect", function() {
console.log("disconnect");
});
socket.on("message", function(data) {
console.log("server says " + JSON.stringify(data));
});
</script>
</body>
</html>