public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9
server.on('connection', function(socket) {
var client_id = clients.push(socket)
console.log('connected. '+clients.length+' clients. '+clients);
socket.on('data', go)
socket.on('close', function() {
clients.splice(client_id-1,1)
console.log('closed. client list '+clients)
})
})

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.