I was going through this code to try and understand websockets.
Just to be clear I am not asking about sockets.io events emitters. Those I understand.
What I do not understand is the advantage of using nodejs eventEmitters, as used here. My question is why not just call a function from that line instead of using an event emitter? Is there any advantage of using the event emitter?