Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Created November 13, 2014 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhoff/dc73119f59a13bdb7fbf to your computer and use it in GitHub Desktop.
Save alanhoff/dc73119f59a13bdb7fbf to your computer and use it in GitHub Desktop.
// no arquivo1.js
process.on('excluir', function(socket){
array_de_sockets.splice(socket.....);
});
// no arquivo2.js
if(tem_alguma_coisa_errada)
process.emit('excluir', socket);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment