setRequestHandler

inline fun <T : Request> setRequestHandler(method: Method, noinline block: suspend (T, RequestHandlerExtra) -> SendResultT?)(source)

Registers a handler to invoke when this protocol object receives a request with the given method.

Note that this will replace any previous request handler for the same method.