node.js - Why it use client.set/get instead of Object property? -
all.
I have a question in socket.io socket. O, it provides socket.Set / method for storing and retrieving the value related to the socket. It seems useful but I have a question about it.
Instead of using the socket.Set (key, value) I think the object properties can be an alternative solution like this socket [key] = value
What is the use of user socket Does any special benefit / substitute property get / get profit?
Like Cluster Detailed Replication etc. Thanx in advance
I have analyzed the socket.io source code.
Uses an internal set / memstor, it stores the value for the property property and if it uses rediscover, the set value is stored in Redis.
So the value to other nodes Js can be shared using Redis, by example.
Comments
Post a Comment