addListener

Adds a listener for the provided clazz.

Parameters

clazz

the class to register a listener for

consumer

the consumer that will be triggered by the server when it is ready to be consumed.


inline fun <T : IncomingGameMessage> addListener(crossinline listener: R.(message: T) -> Unit): GameMessageConsumerRepositoryBuilder<R>

Adds a listener for the provided T; this function is an overload of the addListener, intended to make registering listeners from Kotlin easier

Parameters

listener

the listener of the message.