private messages issue in mern stack using socket.io
I am facing issue while implementing private messaging using socket.io in nodejs , expressjs and reactjs.
I successfully establish the socket.io connection on backend and frontend and also send message and receive message.But issue is that message is not delivering to the particular user which i select for message , mean if on one side user saim is logged in and on the other side user stephen is logged in if user saim select another user like Rob for messaging and he sent message to the rob and on other side user stephen is logged and he select user Anna for messaging then user stephen receiving that message which saim sent to the rob and same if stephen sent message to Frank on the other side user saim receiving message in the chat box stephen.
I find many solutions and apply them but still not working.I Stuck in this blocker from many days.Please any expert can help me to resolve this issue.
socket.to(“room”).emit(“event”) emits event to sender as well when it shouldn’t
I’m making a multiplayer game using Socket.IO. What I want is this: when a player A joins another player B’s lobby, A’s socket id should be sent to B. Here’s what I’ve done so far.
Error : hostname:3001/socket.io/?EIO=4&transport=polling&t=P3zvxuf:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
Server Code Node JS
socket.io on node server – connection not successful on deployment but worked in development
suspect this is SSL issue, but tried to do SSL test on “https://www.ssllabs.com/ssltest/analyze.html?d=project001db-11.onrender.com”
but got grade A, seems my server is already configured to handle https request ?