Guest User

Untitled

a guest
Aug 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. server.on('connection', function(socket) {
  2. var client_id = clients.push(socket)
  3. console.log('connected. '+clients.length+' clients. '+clients);
  4. socket.on('data', go)
  5. socket.on('close', function() {
  6. clients.splice(client_id-1,1)
  7. console.log('closed. client list '+clients)
  8. })
  9. })
Add Comment
Please, Sign In to add comment