Saturday 15 March 2014

node.js - node socket io - sharing a global object across sockets and between client and server -



node.js - node socket io - sharing a global object across sockets and between client and server -

in socket.io, node.js, there way exchange global object between client , server assigning object socket? or have create emit event exchange global object.

in case, global object array.

you need emit it.

however, resulting object not maintain state between client , server. when emit it, serialized, send on wire, , re-created on other end. if later add together info object on server, client not see new info (nor vice versa).

you can utilize racer handle you.

node.js socket.io

No comments:

Post a Comment