zet-lib 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/io.js +3 -3
- package/package.json +1 -1
package/lib/io.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const { Server } = require('socket.io');
|
|
2
|
+
const io = new Server(); // TANPA listen/attach di sini
|
|
3
3
|
//room = token
|
|
4
4
|
let socketArray = [];
|
|
5
5
|
|
|
@@ -19,7 +19,7 @@ io.on('connection', function (socket) {
|
|
|
19
19
|
});
|
|
20
20
|
// Unset session data via socket
|
|
21
21
|
socket.on('checksession', function() {
|
|
22
|
-
|
|
22
|
+
// console.log('Received checksession message');
|
|
23
23
|
// console.log('socket.handshake session data is %j.', socket.handshake.session);
|
|
24
24
|
socket.emit('checksession', socket.handshake.session);
|
|
25
25
|
});
|