I'm a Developer Relations Manager at Asurion with over 7+ years of development and industry experience. Love just creating stuff and putting it out there!
What you want to do is investigate "Rooms" in socket.io. Here is a link to the documentation: socket.io/docs/v3/rooms/
What you may want to do is have a "lobby" area where users land on before connecting to the chat room. You can enable users to "host" chat rooms and generate a room for only the person(s) they want to chat with.
There are a few ways you could approach it but one way would be to have rooms assigned a specific id that only the host would know and then would have to share with their desired participants (think of how Zoom handles meetings).
I made a chat app with rooms and I would like to share my setup on how I did it but it may be a while before I get a change to write up the blog but it is on my list.
Hope that was helpful in some way!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thats a great question @krishnathota .
What you want to do is investigate "Rooms" in socket.io. Here is a link to the documentation: socket.io/docs/v3/rooms/
What you may want to do is have a "lobby" area where users land on before connecting to the chat room. You can enable users to "host" chat rooms and generate a room for only the person(s) they want to chat with.
There are a few ways you could approach it but one way would be to have rooms assigned a specific id that only the host would know and then would have to share with their desired participants (think of how Zoom handles meetings).
I made a chat app with rooms and I would like to share my setup on how I did it but it may be a while before I get a change to write up the blog but it is on my list.
Hope that was helpful in some way!