Last active
July 19, 2018 17:14
-
-
Save diericx/f9dc6459aba413346e329fb29f03c4c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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