How to use socket.io in any particular route following by in particular controller in Adonis.js?

I am trying to use socket.io not globally but in any particular controller.

I am also trying to emit and listen just only in backend, let’s say one controller to another!

Here’s what I’ve done so far. But Not being successful to listen Connection event from the any controller.

start/socket.js

const Server = use('Server')
// const io = use('socket.io')(Server.getInstance())
var io = null

var sio = use('socket.io');
// var sio = null;


// io.on('connection', function (socket) {
//   console.log(`socket connected by ${socket.id}`)
// })

exports.io = () => {

  return io
}

exports.initialize = (server) => {

  return io = sio(server)
}

app/controller/http/SocketTestController.js

'use strict'
const Server = use('Server')
// const io = use('socket.io')(Server.getInstance())

const io = require('../../../start/socket').initialize(Server.getInstance())
class SocketTestController {

    async getConnect({ request, response }) {
        
        // console.log('id', io.initialize(Server))
        require('../../../start/socket').io().on('connection', function (socket) {
            console.log(`socket connected by ${socket.id}`)
        })

        return 'sdfs'
    }
}

module.exports = SocketTestController