Skip to content

Tag: socket.io

Setting Socket.io room variables

I would like to store some information in the socket room variables, but am getting the following error: UnhandledPromiseRejectionWarning: TypeError: Cannot set property ‘host’ of undefined This is my code: If I try to log socket.roomId it would return something like rBAhx0. And when I log io.sock…

socket.io broadcast in a room

I am trying to use socket.io to broadcast only to users of a specific room (in another word, to send to all users in that room except me, the sender). So far, I have tried: None of them work unfortunately. Answer io.of(“/”).to(room_temp).emit(‘transcription’, data); would submit to eve…

Cannot connect to socket io server

I have bot socket IO client and server running. I want to have client communicate with server. Server initialization Client initialization Socket IO debug output I enabled debug, but socket IO debug output is not very useful anyway: Notice that the listener for connection that I added triggers, but socket IO …