How to access socket file into other controller
socket.js file
module.exports = function (io) { io.use(async function (socket, next) { }).on(\