'add user' emit?
basickarl opened this issue · comments
Karl Morrison commented
I don't see in the example how 'add user' is invoked? I was expecting a line of code to state: this.broadcast.emit('add user'...
Karl Morrison commented
Nvm found it, socket.emit('add user', username);
on the client .js file. I'm guessing server side can't invoke the routes, only via the socket from client side?
Ari Porad commented
Yeah, because it's the client sending a message to the server. The message is sent once the user picks a username.
Karl Morrison commented
Thank you for your quick response understand now! :)