Updating the node.js server when another client connects using socket.io?
===

The problem i have is quite algorithmic oppose to a programming one, this is the scenario that i have. i have a variable which holds a timer(constantly updated) on the client side.

`var timer = getCurrentTime();`

**Client 1** is already connected to a socket, on client 1 machine the `timer` says its at `39.6'

so when **Client 2** connects to a websocket:

i.e

    socket.on('connect', function () {
    // access server-side and request the timer variable 
    //from client 1(should return for example 39.6)

one of the ways i thought was to constantly update the node.js server with the timer variable. but i thought might be a problem with performance.

the other way which i thought we can do this is, only when client 2 socket connect then request the timer and send it back. any ideas for this problem thanks.

