Relative Content

Tag Archive for reactjsnode.jssocket.io

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.