Can I have multiple websockets on a single webpage? I want to implement a real time chat application just like facebook. Also can you please tell how facebook handles multiple users chats at the same time ? Whether only one websocket is being opened for chat or multiple websockets are opened and configuration is done on server side ?
Just googled many areas and got to the conclusion that we must implement one websocket in one webpage & can send more data which help in identifying what type of message & to whom it must be delivered like in my case I can send sender's name and receiver's name with that message to the backend server with the only websocket opened accordingly.
We can also have multiple websockets on one page but it is not recommended