onMessage

var onMessage: (event: EventSource.Event) -> Unit?

Message handler.

Handler is called for all events received, regardless of type.