Register a handler for a specific event. The handler will be called whenever the event is received from the server.
The event name to listen for
Suspend function to handle the event data