-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguest.html
More file actions
71 lines (63 loc) · 1.96 KB
/
Copy pathguest.html
File metadata and controls
71 lines (63 loc) · 1.96 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>
<script>
(function() {
let socket = io.connect('http://localhost:8080');
// let email = 'zeabox@yaa.ru';
// let name = 'Evg';
// let domain = 'localhost';
// socket.emit('getNewChat', {
// email: email,
// name: name,
// domain: domain
// });
// socket.on('getNewChat', function(msg) {
// console.log(msg);
// });
let chatId = '59f8ccbd6f42412d4cd685f5';
let token = '16e66f60c410f672a3b9f4d4f52dea58';
socket.emit('newMessage', {
chatId: chatId,
token: token,
message: 'hi i am guest'
});
socket.on('newMessage', function(msg) {
console.log(msg);
});
// let chatId = '59f708172b16261fc0165f54';
// let token = '277b7bb0c61d0c6d840c64a123c28a0e';
// socket.emit('getChatMessages', {
// chatId: chatId,
// token: token,
// limit: 10,
// skip: 0,
// });
//
// socket.on('getChatMessages', function(msg) {
// console.log(msg);
// });
// let token = '528f3b47c1191f99d008d02774bcc7a4';
// socket.emit('getActiveChats', {
// token: token,
// });
//
// socket.on('getActiveChats', function(msg) {
// console.log(msg);
// });
// let token = '528f3b47c1191f99d008d02774bcc7a4';
// socket.emit('getWaitingChats', {
// token: token,
// });
//
// socket.on('getWaitingChats', function(msg) {
// console.log(msg);
// });
})();
</script>
</head>
<body>
</body>
</html>