WebSockets and managing multiple client connections

in mailhustle •  7 years ago  (edited)

So you have multiple users.

Certain operations take time on the backend.

Server updates client via websockets.

Example how to manage multiple clients:

Screen Shot 2018-04-25 at 23.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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!