Backend to Frontend Websocket

Viewed 48

I need to add support for instant messages or reminders to my web application. I was reading that this could be accomplished with websockets.

The idea is that during the time the web app is been used, it could receive messages originated (not as a request response) from the server. For example, the server application might want to remind the user about and unpaid service.

As I understand, when the web app starts it connects to the websocket server through a standard HTTP Request call to announce itself as a client. My question is:

"If I have hundreds of clients connected at the same time, how do I call one in particular?"

Do I need to store every websocket object in an array or something so I can use it to send a message when it is required?
What would be the right approach?

Thanks.

0 Answers
Related