I'm trying to follow this example, but getting stuck in 2 places: 1. `on('connection'...` getting triggered multiple times:  2. emit will simply not work. any clues?