more cleanup and better to have some prop drilling but just stay balanced here
This commit is contained in:
@@ -29,6 +29,10 @@ const socketIdsToUserIds: {
|
||||
export default function InitializeWs(io: any) {
|
||||
console.log("initializing web sockets");
|
||||
|
||||
setInterval(() => {
|
||||
console.log(socketIdsToUserIds);
|
||||
}, 5000);
|
||||
|
||||
return io
|
||||
.use(function (socket: any, next: any) {
|
||||
console.log("authenticating user...");
|
||||
@@ -163,6 +167,9 @@ export default function InitializeWs(io: any) {
|
||||
// notify everyone of this disconnection
|
||||
|
||||
console.log("user disconnected");
|
||||
console.log(
|
||||
`list of sockets mappings in memory: ${socketIdsToUserIds}`
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user