Skip to content

Instantly share code, notes, and snippets.

@diericx
Last active July 19, 2018 17:14
Show Gist options
  • Select an option

  • Save diericx/f9dc6459aba413346e329fb29f03c4c4 to your computer and use it in GitHub Desktop.

Select an option

Save diericx/f9dc6459aba413346e329fb29f03c4c4 to your computer and use it in GitHub Desktop.
// Listen for connections
io.on('connection', function(client){
// Let us know someone connected
console.log("Client connected!")
// When a player sends the join message
client.on('join', function(data) {
// TODO 1: Do something about a player joining
})
// TODO 2: Listen for more packets
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment