Join room in another namespace in

roy wiliams
roy wiliams used Ask the Experts™
I have this code bellow and it works great in version 1.3.7

this.gameInfra = io.of('/game_infra');
this.gameInfra.on('connection', (socket) => {

    socket.on('join_room', (room) => {
            var comSocket = self.chatCom.connected[];

this.chatCom = io.of('/chat_com');
this.chatCom.on('connection', (socket) => {
    socket.on('message', (message) => {
            message.username = self.gameInfra.connected[].username;

Open in new window

I want to upgrade my to the latest version but this code
var comSocket = self.chatCom.connected[]; 

Open in new window

is undefined in newer versions.

Anyone who nows the new syntax?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Why do you want to upgrade your version?


The last post in the link was my solution.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial