node.js

Get socket object

I’m using socket.io together with redis and I need to get the socket object since there’s data I need to access that’s added during the middleware.
When I do this:
const { socketServer } = require(‘../../socket/socket’);
const allSockets =…