WebSockets and managing multiple client connections

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@mailhustle·
0.000 HBD
WebSockets and managing multiple client connections
So you have multiple users.

Certain operations take time on the backend.

Server updates client via `websockets`.

[Example](https://medium.com/@willrigsbee/how-to-keep-track-of-clients-with-websockets-1a018c23bbfc) how to manage multiple clients: 


![Screen Shot 2018-04-25 at 23.42.49.png](https://steemitimages.com/DQmUo61u7zFpQuYr24TGwH9BsoPFdFY8q7kSDfuDWVuCzMP/Screen%20Shot%202018-04-25%20at%2023.42.49.png)

I was always respecting users and ensuring great usability. Sending love, always love...

# Cannot send objects

https://stackoverflow.com/questions/13028604/sending-a-javascript-object-through-websockets-with-faye

I was figuring it out, why is it displayed as `[object Object]` so now we know. Will have to `JSON.stringify` and then `JSON.parse` probably the easiest way...

# Minimalistic implementation

This is a good one: https://hackernoon.com/nodejs-web-socket-example-tutorial-send-message-connect-express-set-up-easy-step-30347a2c5535
👍 ,