Why Isn't The Socket Connection Counter Updating?
this is the code I have in an index.html (client). Im wondering why the number is not being incremented. I expect on each time a socket connect I give it a unique name. var number
Solution 1:
Because javascript is a client side, and number will always be 0 every time the page refresh/load.
You can count the number client connected in your websocket, server then pass it to js and then you can increment.
Post a Comment for "Why Isn't The Socket Connection Counter Updating?"